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:
parent
ec20e87bab
commit
4c429ad7ee
3 changed files with 20 additions and 16 deletions
|
@ -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"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue