summaryrefslogtreecommitdiff
path: root/Git/Ref.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Git/Ref.hs')
-rw-r--r--Git/Ref.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Git/Ref.hs b/Git/Ref.hs
index 5ad7577ff..6bc47d5ed 100644
--- a/Git/Ref.hs
+++ b/Git/Ref.hs
@@ -88,6 +88,9 @@ sha branch repo = process <$> showref repo
process [] = Nothing
process s = Just $ Ref $ firstLine s
+headSha :: Repo -> IO (Maybe Sha)
+headSha = sha headRef
+
{- List of (shas, branches) matching a given ref or refs. -}
matching :: [Ref] -> Repo -> IO [(Sha, Branch)]
matching refs repo = matching' (map fromRef refs) repo