From a6dc204fbb6f82702bc093f1ab523802c7826108 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 12 Nov 2014 15:57:38 -0400 Subject: simplify --- Git/Branch.hs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Git/Branch.hs') diff --git a/Git/Branch.hs b/Git/Branch.hs index 1d5ffd39d..5c6135d57 100644 --- a/Git/Branch.hs +++ b/Git/Branch.hs @@ -44,10 +44,7 @@ currentUnsafe r = parse . firstLine | otherwise = Just $ Git.Ref l currentSha :: Repo -> IO (Maybe Git.Sha) -currentSha r = go =<< current r - where - go Nothing = return Nothing - go (Just ref) = Git.Ref.sha ref r +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. -} -- cgit v1.2.3