diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-03-31 12:27:48 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-03-31 12:27:48 -0400 |
commit | cd92a8bca739998bb70b5a131181c7eb52980ffe (patch) | |
tree | 1ecd4e601625eadb97bcd97bf84c97ae3084d985 /Git | |
parent | fb5ffecf202dd8c6b9ea13ab383e7332fa88f0f2 (diff) |
add reflog messages
Diffstat (limited to 'Git')
-rw-r--r-- | Git/Branch.hs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Git/Branch.hs b/Git/Branch.hs index a0c15d171..6258939cb 100644 --- a/Git/Branch.hs +++ b/Git/Branch.hs @@ -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 |