diff options
Diffstat (limited to 'Git/Ref.hs')
-rw-r--r-- | Git/Ref.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Git/Ref.hs b/Git/Ref.hs index 09472930f..88717ce47 100644 --- a/Git/Ref.hs +++ b/Git/Ref.hs @@ -11,6 +11,7 @@ import Common import Git import Git.Command import Git.Sha +import Git.Types import Data.Char (chr) @@ -51,6 +52,10 @@ underBase dir r = Ref $ dir ++ "/" ++ show (base r) fileRef :: FilePath -> Ref fileRef f = Ref $ ":./" ++ f +{- Converts a Ref to refer to the content of the Ref on a given date. -} +dateRef :: Ref -> RefDate -> Ref +dateRef (Ref r) (RefDate d) = Ref $ r ++ "@" ++ d + {- A Ref that can be used to refer to a file in the repository as it - appears in a given Ref. -} fileFromRef :: Ref -> FilePath -> Ref |