expand
This commit is contained in:
parent
2e153de34a
commit
35e1697377
1 changed files with 7 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue