add reflog messages

This commit is contained in:
Joey Hess 2016-03-31 12:27:48 -04:00
parent 02ce75c87d
commit a585731935
Failed to extract signature
3 changed files with 20 additions and 11 deletions

View file

@ -100,7 +100,7 @@ fastForward branch (first:rest) repo =
where
no_ff = return False
do_ff to = do
update branch to repo
update' branch to repo
return True
findbest c [] = return $ Just c
findbest c (r:rs)
@ -155,7 +155,7 @@ commit commitmode allowempty message branch parentrefs repo = do
ifM (cancommit tree)
( do
sha <- commitTree commitmode message parentrefs tree repo
update branch sha repo
update' branch sha repo
return $ Just sha
, return Nothing
)
@ -185,8 +185,17 @@ forcePush :: String -> String
forcePush b = "+" ++ b
{- Updates a branch (or other ref) to a new Sha. -}
update :: Branch -> Sha -> Repo -> IO ()
update branch sha = run
update :: String -> Branch -> Sha -> Repo -> IO ()
update message branch sha = run
[ Param "update-ref"
, Param "-m"
, Param message
, Param $ fromRef branch
, Param $ fromRef sha
]
update' :: Branch -> Sha -> Repo -> IO ()
update' branch sha = run
[ Param "update-ref"
, Param $ fromRef branch
, Param $ fromRef sha