add --verify
Needed for the --quiet to actually shut it up. The extra verification this makes it do should be fine, as this is supposed to really return a single tree's sha.
This commit is contained in:
parent
e29f07258a
commit
ecdbdf6180
1 changed files with 5 additions and 2 deletions
|
@ -143,10 +143,13 @@ delete oldvalue ref = run
|
|||
, Param $ fromRef oldvalue
|
||||
]
|
||||
|
||||
{- Gets the sha of the tree a ref uses. -}
|
||||
{- Gets the sha of the tree a ref uses.
|
||||
-
|
||||
- The ref may be something like a branch name, and it could contain
|
||||
- ":subdir" if a subtree is wanted. -}
|
||||
tree :: Ref -> Repo -> IO (Maybe Sha)
|
||||
tree (Ref ref) = extractSha <$$> pipeReadStrict
|
||||
[ Param "rev-parse", Param "--quiet", Param ref' ]
|
||||
[ Param "rev-parse", Param "--verify", Param "--quiet", Param ref' ]
|
||||
where
|
||||
ref' = if ":" `isInfixOf` ref
|
||||
then ref
|
||||
|
|
Loading…
Add table
Reference in a new issue