diff options
author | Joey Hess <joey@kitenet.net> | 2012-09-15 19:47:23 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-09-15 20:15:16 -0400 |
commit | 750c4ac6c282d14d19f79e0711f858367da145e4 (patch) | |
tree | fbed8ddaa3fa2f9cc8701cbb68bd0620866aa290 /Locations.hs | |
parent | a1f93f06fdda44c38c010b68ed3305029d65098a (diff) |
bugfix: avoid staging but not committing changes to git-annex branch
Branch.get is not able to see changes that have been staged to the index
but not committed. This is a limitation of git cat-file --batch; when
reading from the index, as opposed to from a branch, it does not notice
changes made after the first time it reads the index.
So, had to revert the changes made in 1f73db3469e29448bcb1520893de11b23da6fb1f
to make annex.alwayscommit=false stage changes.
Also, ensure that Branch.change and Branch.get always see changes
at all points during a commit, by not deleting journal files when
staging to the index. Delete them only after committing the branch.
Before, there was a race during commits where a different git-annex
could see out-of-date info from the branch while a commit was in progress.
That's also done when updating the branch to merge in remote branches.
In the case where the local git-annex branch has had changes pushed into it
that are not yet reflected in the index, and there are journalled changes
as well, a merge commit has to be done.
Diffstat (limited to 'Locations.hs')
-rw-r--r-- | Locations.hs | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/Locations.hs b/Locations.hs index d68d5fb5f..3e278dcbb 100644 --- a/Locations.hs +++ b/Locations.hs @@ -23,7 +23,6 @@ module Locations ( gitAnnexJournalLock, gitAnnexIndex, gitAnnexIndexLock, - gitAnnexIndexDirty, gitAnnexPidFile, gitAnnexDaemonStatusFile, gitAnnexLogFile, @@ -152,10 +151,6 @@ gitAnnexIndex r = gitAnnexDir r </> "index" gitAnnexIndexLock :: Git.Repo -> FilePath gitAnnexIndexLock r = gitAnnexDir r </> "index.lck" -{- Flag file for .git/annex/index. -} -gitAnnexIndexDirty :: Git.Repo -> FilePath -gitAnnexIndexDirty r = gitAnnexDir r </> "index.dirty" - {- Pid file for daemon mode. -} gitAnnexPidFile :: Git.Repo -> FilePath gitAnnexPidFile r = gitAnnexDir r </> "daemon.pid" |