move commitStaged out of Command.Sync which no longer uses it

It's trivial enough that it it's not worth factoring it out to somewhere
in common with Command.Undo and the assistant.

Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
This commit is contained in:
Joey Hess 2024-02-07 16:19:28 -04:00
parent 21123ba368
commit fa9197560d
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 16 additions and 13 deletions

View file

@ -19,7 +19,6 @@ module Command.Sync (
prepMerge,
mergeLocal,
mergeRemote,
commitStaged,
commitMsg,
pushBranch,
updateBranch,
@ -429,14 +428,6 @@ commitMsg = do
m <- uuidDescMap
return $ "git-annex in " ++ maybe "unknown" fromUUIDDesc (M.lookup u m)
commitStaged :: Git.Branch.CommitMode -> String -> Annex Bool
commitStaged commitmode commitmessage =
inRepo $ Git.Branch.commitCommand commitmode
(Git.Branch.CommitQuiet True)
[ Param "-m"
, Param commitmessage
]
mergeLocal :: [Git.Merge.MergeConfig] -> SyncOptions -> CurrBranch -> CommandStart
mergeLocal mergeconfig o currbranch = stopUnless (notOnlyAnnex o) $
mergeLocal' mergeconfig o currbranch