Improve error message when --in @date is used and there is no reflog for the git-annex branch.
This commit is contained in:
parent
f0ff3a08ea
commit
3af4691978
4 changed files with 23 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue