diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-03-26 11:15:15 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-03-26 11:15:15 -0400 |
commit | 6244ee2a9d1a2509d68bf55d71c2f43e5009501f (patch) | |
tree | a67d31aae272e075410dd222b618dfab609b0d11 /Git | |
parent | 4b803e23360b89187a1af7af023fda05e42c8d62 (diff) |
Improve error message when --in @date is used and there is no reflog for the git-annex branch.
Diffstat (limited to 'Git')
-rw-r--r-- | Git/RefLog.hs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Git/RefLog.hs b/Git/RefLog.hs index f3a9dad38..7c20047ad 100644 --- a/Git/RefLog.hs +++ b/Git/RefLog.hs @@ -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 |