sync: Commit in direct mode even if no changes were staged
There may be already staged changes from a prior `git annex add`, so always commit. Also, suppressed the commit output, since it contains noise due to typechanged files in direct mode.
This commit is contained in:
parent
fa9d37fab7
commit
16503f5692
1 changed files with 5 additions and 3 deletions
|
@ -80,8 +80,9 @@ syncRemotes rs = ifM (Annex.getState Annex.fast) ( nub <$> pickfast , wanted )
|
|||
commit :: CommandStart
|
||||
commit = next $ next $ do
|
||||
ifM isDirect
|
||||
( ifM stageDirect
|
||||
( runcommit [] , return True )
|
||||
( do
|
||||
void $ stageDirect
|
||||
runcommit []
|
||||
, runcommit [Param "-a"]
|
||||
)
|
||||
where
|
||||
|
@ -90,8 +91,9 @@ commit = next $ next $ do
|
|||
showOutput
|
||||
Annex.Branch.commit "update"
|
||||
-- Commit will fail when the tree is clean, so ignore failure.
|
||||
_ <- inRepo $ Git.Command.runBool $ (Param "commit") : ps ++
|
||||
let params = (Param "commit") : ps ++
|
||||
[Param "-m", Param "git-annex automatic sync"]
|
||||
_ <- inRepo $ tryIO . Git.Command.runQuiet params
|
||||
return True
|
||||
|
||||
mergeLocal :: Git.Ref -> CommandStart
|
||||
|
|
Loading…
Add table
Reference in a new issue