unused: --used-refspec can now be configured to look at refs in the reflog. This provides a way to not consider old versions of files to be unused after they have reached a specified age, when the old refs in the reflog expire.
May be slow.
This commit is contained in:
parent
a51b98cdd5
commit
b11d2f5a8a
7 changed files with 40 additions and 13 deletions
|
@ -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"] fullname))
|
||||
ifM (null <$> inRepo (Git.RefLog.get' [Param "-n1"] (Just fullname)))
|
||||
( error ("No reflog for " ++ fromRef fullname)
|
||||
, getRef (Git.Ref.dateRef fullname date) file
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue