Improve error message when --in @date is used and there is no reflog for the git-annex branch.

This commit is contained in:
Joey Hess 2015-03-26 11:15:15 -04:00
parent f0ff3a08ea
commit 3af4691978
4 changed files with 23 additions and 7 deletions

View file

@ -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