diff options
author | Joey Hess <joey@kitenet.net> | 2014-11-12 15:57:38 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-11-12 15:57:38 -0400 |
commit | a6dc204fbb6f82702bc093f1ab523802c7826108 (patch) | |
tree | 6d57006497c362c9a9b5af54ab3e3d2d53a94289 /Git | |
parent | 94f4698441e58316494d46af0d2c9f8374bf89ff (diff) |
simplify
Diffstat (limited to 'Git')
-rw-r--r-- | Git/Branch.hs | 5 |
1 files changed, 1 insertions, 4 deletions
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. -} |