From 36852d90bc18cb7b2bddb1ce9dce39cc1f0203de Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 29 Apr 2015 14:59:49 -0400 Subject: Merge from git-annex. --- Git/RefLog.hs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'Git/RefLog.hs') diff --git a/Git/RefLog.hs b/Git/RefLog.hs index 98c9d66..7c20047 100644 --- a/Git/RefLog.hs +++ b/Git/RefLog.hs @@ -1,6 +1,6 @@ {- git reflog interface - - - Copyright 2013 Joey Hess + - Copyright 2013 Joey Hess - - Licensed under the GNU GPL version 3 or higher. -} @@ -14,9 +14,14 @@ import Git.Sha {- Gets the reflog for a given branch. -} get :: Branch -> Repo -> IO [Sha] -get b = mapMaybe extractSha . lines <$$> pipeReadStrict - [ Param "log" - , Param "-g" - , Param "--format=%H" - , Param (fromRef b) - ] +get = get' [] + +get' :: [CommandParam] -> Branch -> Repo -> IO [Sha] +get' ps b = mapMaybe extractSha . lines <$$> pipeReadStrict ps' + where + ps' = + [ Param "log" + , Param "-g" + , Param "--format=%H" + , Param (fromRef b) + ] ++ ps -- cgit v1.2.3