Please describe the problem.
Playing with the new fancy "export" feature. Thanks again!
Somehow I see now commits in the git-annex branch in the quick succession establishing and then killing a "graft". Are they really needed/used by annex or could have been squashed/avoided?
some details of the recent history of commands and how git-annex branch looks like are listed below
What version of git-annex are you using? On what operating system?
6.20171018+gitgbb20b1ed3-1~ndall+1
Please provide any additional information below.
14883 tree /tmp/test-directory-export -a
14887 git annex info
14888 git annex export --to=directory-export
14889 git annex export
14890 git annex export --tracking master --to public-s3
14891 git annex export --tracking master --to directory-export
14892 git annex export
14893 git annex export --to directory-export
14894 git annex export
14896 git annex sync --content
14898 git log --stat git-annex
$> git lg --stat git-annex | head -n 30
* 4a03be8 - (git-annex) update (4 minutes ago) [Yaroslav Halchenko]|
| export.log | 2 +-
| 1 file changed, 1 insertion(+), 1 deletion(-)
* b23ae9d - graft cleanup (4 minutes ago) [Yaroslav Halchenko]|
| export.tree/.datalad/.gitattributes | 3 ---
| export.tree/.datalad/config | 2 --
| export.tree/.gitattributes | 1 -
| export.tree/123 | 1 -
| export.tree/sub/dir/11 | 1 -
| 5 files changed, 8 deletions(-)
* 6a0bc5f - graft (4 minutes ago) [Yaroslav Halchenko]|
| export.tree/.datalad/.gitattributes | 3 +++
| export.tree/.datalad/config | 2 ++
| export.tree/.gitattributes | 1 +
| export.tree/123 | 1 +
| export.tree/sub/dir/11 | 1 +
| 5 files changed, 8 insertions(+)
* 919e345 - update (5 minutes ago) [Yaroslav Halchenko]|
| export.log | 2 +-
| 1 file changed, 1 insertion(+), 1 deletion(-)
They're really needed. Squashing them together would make the tree ref that's being grafted in not be reachable, so it would be subject to GC, which would lose data that the export feature needs to make sure is retained for later.
It would be possible to squash the graft cleanup with the export.log update commit. However, I was unable to stage the graft into the git-annex branch index file using git update-index, due to possibly a bug in git, so I was not able to find a way to do that. See 5483ea90eca33f61c799fb6a3c2675657caa9c75
The diff makes it look somehow big and expensive, but the actual overhead on disk is two commit objects. The tree object being grafted in is the exported tree, so retaining it does not really add any overhead. So something in the area of 2 kb overhead, per export of a tree.