From 5169999b07253b85a9610acde56e589279c563c9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 2 Mar 2015 15:56:37 -0400 Subject: [PATCH] add -q to git symbolic-ref call Avoids a warning message from git when HEAD doesn't exist. Which it won't when eg, git-annex is used in a submodule just cloned with git clone --recursive. In this case, a specific ref is checked out and there's no HEAD yet. The code already returned Nothing in this case, so no behavior change other than not showing the warning. And git-annex operates fine in this situation. --- Git/Branch.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Git/Branch.hs b/Git/Branch.hs index fd04f1f465..523c641d7c 100644 --- a/Git/Branch.hs +++ b/Git/Branch.hs @@ -37,7 +37,7 @@ current r = do {- The current branch, which may not really exist yet. -} currentUnsafe :: Repo -> IO (Maybe Git.Ref) currentUnsafe r = parse . firstLine - <$> pipeReadStrict [Param "symbolic-ref", Param $ fromRef Git.Ref.headRef] r + <$> pipeReadStrict [Param "symbolic-ref", Param "-q", Param $ fromRef Git.Ref.headRef] r where parse l | null l = Nothing