summaryrefslogtreecommitdiff
path: root/Git/Branch.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Git/Branch.hs')
-rw-r--r--Git/Branch.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Git/Branch.hs b/Git/Branch.hs
index 41ae2559e..d4a684016 100644
--- a/Git/Branch.hs
+++ b/Git/Branch.hs
@@ -13,6 +13,7 @@ import Common
import Git
import Git.Sha
import Git.Command
+import Git.Ref (headRef)
{- The currently checked out branch.
-
@@ -35,7 +36,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 "HEAD"] r
+ <$> pipeReadStrict [Param "symbolic-ref", Param $ show headRef] r
where
parse l
| null l = Nothing