diff options
author | Joey Hess <joey@kitenet.net> | 2013-12-01 15:14:13 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-12-01 15:14:13 -0400 |
commit | 3bdf2d2052f3a194b3f72500ca71867fb22e1315 (patch) | |
tree | d4a076f7fc1ca255ded959779d99404525f7de78 /Git/Ref.hs | |
parent | 3c7357ee388795149e922d344bdbf32e1d1d5810 (diff) | |
download | git-repair-3bdf2d2052f3a194b3f72500ca71867fb22e1315.tar.gz |
merge from git-annex
Note that the batchCommand stuff is not used in git-repair, so
configure does not need to check for nice, ionice, and nocache,
nor are they dependend on.
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) -} |