sync: Ensure that pending changes to git-annex branch are committed when in direct mode. (Fixing a very minor reversion.)

This commit is contained in:
Joey Hess 2014-09-11 14:35:28 -04:00
parent ec20e87bab
commit 4c429ad7ee
3 changed files with 20 additions and 16 deletions

View file

@ -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"

2
debian/changelog vendored
View file

@ -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

View file

@ -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]]