This commit is contained in:
Joey Hess 2018-08-17 10:48:18 -04:00
parent 2e153de34a
commit 35e1697377
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -113,9 +113,10 @@ support symlinks.
## index gotchas ## index gotchas
When git-annex gets or drops the content of an unlocked file, it updates When git-annex gets or drops the content of an unlocked file, it updates
the file in git's worktree accordingly. Then it needs to update the index the file in git's worktree accordingly. That makes `git status` show
file to reflect the change. Otherwise, `git status` would show the file the file as modified, even though there are no changes to commit.
as modified, even though there are no changes to commit. So git-annex then updates the index file to reflect the change to the
worktree, and prevent the file from appearing to be modified.
This means that when git-annex is running a command that gets or drops the This means that when git-annex is running a command that gets or drops the
content of an unlocked file, the index will sometimes be locked. This might content of an unlocked file, the index will sometimes be locked. This might
@ -123,6 +124,9 @@ prevent you from `git commit` at the same time. Or, if you have a git
commit in progress, or are running multiple git-annex processes, git-annex commit in progress, or are running multiple git-annex processes, git-annex
may complain that the index is locked. may complain that the index is locked.
Also, interrupting git-annex (eg with ctrl-c) before it can update the
index will leave `git status` showing modifications.
To manually update the index when git-annex was not able to, you can run: To manually update the index when git-annex was not able to, you can run:
git update-index -q --refresh $file git update-index -q --refresh $file