diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-01-13 18:36:17 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-01-13 18:36:17 -0400 |
commit | 3e0c966e1da392b5c9ecdbb0e0a115088a784b15 (patch) | |
tree | 2262951b1f82d792f8942bdaac4cc505c2cff8d4 /Command | |
parent | e8c8e506d696173512dd134766c9d7fc8ea63c32 (diff) |
devblog
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Sync.hs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Command/Sync.hs b/Command/Sync.hs index 0433153b1..5ecd0745a 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -52,11 +52,17 @@ cmd = [withOptions syncOptions $ seek SectionCommon "synchronize local repository with remotes"] syncOptions :: [Option] -syncOptions = [ contentOption ] +syncOptions = + [ contentOption + , messageOption + ] contentOption :: Option contentOption = flagOption [] "content" "also transfer file contents" +messageOption :: Option +messageOption = fieldOption ['m'] "message" "MSG" "specify commit message" + seek :: CommandSeek seek rs = do prepMerge @@ -139,6 +145,8 @@ syncRemotes rs = ifM (Annex.getState Annex.fast) ( nub <$> pickfast , wanted ) commit :: CommandStart commit = next $ next $ do + commitmessage <- fromMaybe "git-annex automatic sync" + <$> Annex.getField (optionName messageOption) showStart "commit" "" Annex.Branch.commit "update" ifM isDirect @@ -154,8 +162,6 @@ commit = next $ next $ do ] return True ) - where - commitmessage = "git-annex automatic sync" commitStaged :: Git.Branch.CommitMode -> String -> Annex Bool commitStaged commitmode commitmessage = go =<< inRepo Git.Branch.currentUnsafe |