Only look at reflogs for relevant branches, not for git-annex branches

This speeds it up quite a bit.. May still be too slow in large repos.
This commit is contained in:
Joey Hess 2015-07-07 17:31:30 -04:00
parent 600717417f
commit 24800b1bf1
3 changed files with 9 additions and 9 deletions

View file

@ -210,7 +210,7 @@ getHistorical :: RefDate -> FilePath -> Annex String
getHistorical date file =
-- This check avoids some ugly error messages when the reflog
-- is empty.
ifM (null <$> inRepo (Git.RefLog.get' [Param "-n1"] (Just fullname)))
ifM (null <$> inRepo (Git.RefLog.get' [Param (fromRef fullname), Param "-n1"]))
( error ("No reflog for " ++ fromRef fullname)
, getRef (Git.Ref.dateRef fullname date) file
)