diff options
author | Joey Hess <joeyh@debian.org> | 2013-12-03 15:02:21 -0400 |
---|---|---|
committer | Joey Hess <joeyh@debian.org> | 2013-12-03 15:02:21 -0400 |
commit | b1ed0aee347a88507d1530f61006cd658b57e54c (patch) | |
tree | eb2a975663782f83e6b20d6d239447d7222de81b /Git/Ref.hs | |
parent | 7e592e1d6ed5e0b25b37215da7558c6324688d6f (diff) | |
parent | a4f3e112954e1b785c84c339bcbd83597a89335e (diff) | |
download | git-repair-b1ed0aee347a88507d1530f61006cd658b57e54c.tar.gz |
Record git-repair (1.20131203) in archive suite sid
Diffstat (limited to 'Git/Ref.hs')
-rw-r--r-- | Git/Ref.hs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -10,6 +10,7 @@ module Git.Ref where import Common import Git import Git.Command +import Git.Sha import Data.Char (chr) @@ -105,6 +106,11 @@ matchingUniq refs repo = nubBy uniqref <$> matching refs repo where uniqref (a, _) (b, _) = a == b +{- Gets the sha of the tree a ref uses. -} +tree :: Ref -> Repo -> IO (Maybe Sha) +tree ref = extractSha <$$> pipeReadStrict + [ Param "rev-parse", Param (show ref ++ ":") ] + {- Checks if a String is a legal git ref name. - - The rules for this are complex; see git-check-ref-format(1) -} |