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 :: CommandStart
|
||||||
commit = next $ next $ do
|
commit = next $ next $ do
|
||||||
ifM isDirect
|
ifM isDirect
|
||||||
( ifM stageDirect
|
( do
|
||||||
( runcommit [] , return True )
|
void $ stageDirect
|
||||||
|
runcommit []
|
||||||
, runcommit [Param "-a"]
|
, runcommit [Param "-a"]
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
|
@ -90,8 +91,9 @@ commit = next $ next $ do
|
||||||
showOutput
|
showOutput
|
||||||
Annex.Branch.commit "update"
|
Annex.Branch.commit "update"
|
||||||
-- Commit will fail when the tree is clean, so ignore failure.
|
-- 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"]
|
[Param "-m", Param "git-annex automatic sync"]
|
||||||
|
_ <- inRepo $ tryIO . Git.Command.runQuiet params
|
||||||
return True
|
return True
|
||||||
|
|
||||||
mergeLocal :: Git.Ref -> CommandStart
|
mergeLocal :: Git.Ref -> CommandStart
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue