From d08c19defbfdbe6fde79f9d91a1eff0d1bf348a3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 6 May 2019 16:26:03 -0400 Subject: [PATCH] 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. --- Git/Ref.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Git/Ref.hs b/Git/Ref.hs index 9d67927fb5..7606ed6fa4 100644 --- a/Git/Ref.hs +++ b/Git/Ref.hs @@ -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