summaryrefslogtreecommitdiff
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
parentf604aa922b1532fc2b282a5f89d93543c62ac86a (diff)
sync: Ensure that pending changes to git-annex branch are committed when in direct mode. (Fixing a very minor reversion.)
-rw-r--r--Command/Sync.hs32
-rw-r--r--debian/changelog2
-rw-r--r--doc/bugs/whereis_does_not_work_in_direct_mode.mdwn2
3 files changed, 20 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"
diff --git a/debian/changelog b/debian/changelog
index 22eaf0bae..ec0684f03 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,8 @@ git-annex (5.20140832) UNRELEASED; urgency=medium
* Fix transfer lock file FD leak that could occur when two separate
git-annex processes were both working to perform the same set of
transfers.
+ * sync: Ensure that pending changes to git-annex branch are committed
+ when in direct mode. (Fixing a very minor reversion.)
-- Joey Hess <joeyh@debian.org> Thu, 04 Sep 2014 16:17:22 -0400
diff --git a/doc/bugs/whereis_does_not_work_in_direct_mode.mdwn b/doc/bugs/whereis_does_not_work_in_direct_mode.mdwn
index 701876c4d..824c91afd 100644
--- a/doc/bugs/whereis_does_not_work_in_direct_mode.mdwn
+++ b/doc/bugs/whereis_does_not_work_in_direct_mode.mdwn
@@ -87,3 +87,5 @@ echo "Why isn't location info available even after sync? (press Enter)"
### What version of git-annex are you using? On what operating system?
git-annex version: 5.20140716-g8c14ba8
+
+> [[fixed|done]] --[[Joey]]