aboutsummaryrefslogtreecommitdiff
path: root/Git/Branch.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-03-02 15:56:37 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-03-02 15:56:37 -0400
commit8f4da219cd9989092afa6a8873421894a6f73eb4 (patch)
tree2626d0d995d66616a4ac6885ae35f66faf3086cd /Git/Branch.hs
parent43ecf83182eaca5c5fc5b132dc1fa0e9db0ee3c0 (diff)
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.
Diffstat (limited to 'Git/Branch.hs')
-rw-r--r--Git/Branch.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Git/Branch.hs b/Git/Branch.hs
index fd04f1f46..523c641d7 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