This commit is contained in:
Joey Hess 2018-08-22 13:58:32 -04:00
parent 38a934cf07
commit e9b2674281
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -6,9 +6,23 @@ git-annex should use smudge/clean filters. v6 mode
and when git-annex starts up, the mv has not happened yet, but once it
wants to update the associated file to drop the content, the mv has
happened, then the content will be left in the working tree despite
git-annex having said it dropped it.
git-annex having said it dropped it. And `git annex move` has the inverse
problem.
git-annex fsck does notice and fix this problem.
git-annex fsck does notice and fix this problem, at least sometimes.
This could be partially dealt with in reconcileStaged. The next time
git-annex runs it, it will notice the staged change, and it could update
the worktree file that was not gotten/dropped before.
But, if a git mv is run, and then a git commit, reconcileStaged won't
get a chance to notice the changes. git commit does run the clean filter.
If the file was supposed to be dropped but is still present, the clean
filter will re-inject it, and it's as if the drop never happened.
OTOH, if the file was supposed to be gotten but is not present, the clean
filter currently does nothing. It would need to update the worktree file
to have the content to fully recover from the race.
* Checking out a different branch causes git to smudge all changed files,
and write their content. This does not honor annex.thin. A warning