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 /Command/InitRemote.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 'Command/InitRemote.hs')
0 files changed, 0 insertions, 0 deletions