simplify
This commit is contained in:
parent
9313abeaf5
commit
c5ca0dc543
1 changed files with 1 additions and 4 deletions
|
@ -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. -}
|
||||||
|
|
Loading…
Add table
Reference in a new issue