From 9af9872f0f54d5d4af2aed3d08eef9ab67012261 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 6 Jan 2015 19:02:48 -0400 Subject: Merge from git-annex. --- Git/Branch.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Git/Branch.hs') diff --git a/Git/Branch.hs b/Git/Branch.hs index 0b7d888..5c6135d 100644 --- a/Git/Branch.hs +++ b/Git/Branch.hs @@ -43,6 +43,9 @@ currentUnsafe r = parse . firstLine | null l = Nothing | otherwise = Just $ Git.Ref l +currentSha :: Repo -> IO (Maybe Git.Sha) +currentSha r = maybe (pure Nothing) (`Git.Ref.sha` r) =<< current r + {- Checks if the second branch has any commits not present on the first - branch. -} changed :: Branch -> Branch -> Repo -> IO Bool -- cgit v1.2.3