summaryrefslogtreecommitdiff
path: root/Git/RefLog.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Git/RefLog.hs')
-rw-r--r--Git/RefLog.hs19
1 files changed, 12 insertions, 7 deletions
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 <joey@kitenet.net>
+ - Copyright 2013 Joey Hess <id@joeyh.name>
-
- 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