summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-09-11 14:35:28 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-09-11 14:35:28 -0400
commitd7651c87dc15ff21ce6325ab4dac222ec4d0f5b3 (patch)
treef8fdb7281029fd137907f5a391c2906bdd299cfd /Command
parentf604aa922b1532fc2b282a5f89d93543c62ac86a (diff)
sync: Ensure that pending changes to git-annex branch are committed when in direct mode. (Fixing a very minor reversion.)
Diffstat (limited to 'Command')
-rw-r--r--Command/Sync.hs32
1 files changed, 16 insertions, 16 deletions
diff --git a/Command/Sync.hs b/Command/Sync.hs
index 50c6fbe69..6a6a254b3 100644
--- a/Command/Sync.hs
+++ b/Command/Sync.hs
@@ -122,22 +122,22 @@ syncRemotes rs = ifM (Annex.getState Annex.fast) ( nub <$> pickfast , wanted )
fastest = fromMaybe [] . headMaybe . Remote.byCost
commit :: CommandStart
-commit = next $ next $ ifM isDirect
- ( do
- showStart "commit" ""
- void stageDirect
- void preCommitDirect
- commitStaged Git.Branch.ManualCommit commitmessage
- , do
- showStart "commit" ""
- Annex.Branch.commit "update"
- inRepo $ Git.Branch.commitQuiet Git.Branch.ManualCommit
- [ Param "-a"
- , Param "-m"
- , Param commitmessage
- ]
- return True
- )
+commit = next $ next $ do
+ showStart "commit" ""
+ Annex.Branch.commit "update"
+ ifM isDirect
+ ( do
+ void stageDirect
+ void preCommitDirect
+ commitStaged Git.Branch.ManualCommit commitmessage
+ , do
+ inRepo $ Git.Branch.commitQuiet Git.Branch.ManualCommit
+ [ Param "-a"
+ , Param "-m"
+ , Param commitmessage
+ ]
+ return True
+ )
where
commitmessage = "git-annex automatic sync"