avoid git warning on first import of subdir from a remote
git rev-parse --quiet avoids "fatal: Invalid object name" when the branch does not exist. Git.Ref.tree already returned a Maybe, so callers already handle those cases themselves.
This commit is contained in:
parent
b03e65d260
commit
d08c19defb
1 changed files with 1 additions and 1 deletions
|
@ -146,7 +146,7 @@ delete oldvalue ref = run
|
|||
{- Gets the sha of the tree a ref uses. -}
|
||||
tree :: Ref -> Repo -> IO (Maybe Sha)
|
||||
tree (Ref ref) = extractSha <$$> pipeReadStrict
|
||||
[ Param "rev-parse", Param ref' ]
|
||||
[ Param "rev-parse", Param "--quiet", Param ref' ]
|
||||
where
|
||||
ref' = if ":" `isInfixOf` ref
|
||||
then ref
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue