This commit is contained in:
Joey Hess 2014-11-12 15:57:38 -04:00
parent 9313abeaf5
commit c5ca0dc543

View file

@ -44,10 +44,7 @@ currentUnsafe r = parse . firstLine
| otherwise = Just $ Git.Ref l | otherwise = Just $ Git.Ref l
currentSha :: Repo -> IO (Maybe Git.Sha) currentSha :: Repo -> IO (Maybe Git.Sha)
currentSha r = go =<< current r currentSha r = maybe (pure Nothing) (`Git.Ref.sha` r) =<< current r
where
go Nothing = return Nothing
go (Just ref) = Git.Ref.sha ref r
{- Checks if the second branch has any commits not present on the first {- Checks if the second branch has any commits not present on the first
- branch. -} - branch. -}