improve alwayscommit=false mode
Now changes are staged into the branch's index, but not committed, which avoids growing a large journal. And sync and merge always explicitly commit, ensuring that even when they do nothing else, they commit the staged changes. Added a flag file to indicate that the branch's journal contains uncommitted changes. (Could use git ls-files, but don't want to run that every time.) In the future, this ability to have uncommitted changes staged in the journal might be used on remotes after a series of oneshot commands.
This commit is contained in:
parent
b49c0c2633
commit
1f73db3469
6 changed files with 44 additions and 7 deletions
|
@ -75,6 +75,7 @@ commit = do
|
|||
showStart "commit" ""
|
||||
next $ next $ do
|
||||
showOutput
|
||||
Annex.Branch.commit "update"
|
||||
-- Commit will fail when the tree is clean, so ignore failure.
|
||||
_ <- inRepo $ Git.Command.runBool "commit"
|
||||
[Param "-a", Param "-m", Param "git-annex automatic sync"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue