--in can now refer to files that were located in a repository at some past date. For example, --in="here@{yesterday}"

This commit is contained in:
Joey Hess 2014-02-06 12:43:56 -04:00
parent e86db3d2ab
commit a44e01c29c
8 changed files with 73 additions and 15 deletions

View file

@ -18,6 +18,7 @@ module Annex.Branch (
forceUpdate,
updateTo,
get,
getHistorical,
change,
commit,
forceCommit,
@ -197,7 +198,13 @@ getLocal file = go =<< getJournalFileStale file
go Nothing = getRaw file
getRaw :: FilePath -> Annex String
getRaw file = withIndex $ L.unpack <$> catFile fullname file
getRaw = getRef fullname
getHistorical :: RefDate -> FilePath -> Annex String
getHistorical date = getRef (Git.Ref.dateRef fullname date)
getRef :: Ref -> FilePath -> Annex String
getRef ref file = withIndex $ L.unpack <$> catFile ref file
{- Applies a function to modifiy the content of a file.
-