diff options
Diffstat (limited to 'Git')
-rw-r--r-- | Git/Branch.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Git/Branch.hs b/Git/Branch.hs index 0b7d888b8..1d5ffd39d 100644 --- a/Git/Branch.hs +++ b/Git/Branch.hs @@ -43,6 +43,12 @@ currentUnsafe r = parse . firstLine | null l = Nothing | 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 + {- Checks if the second branch has any commits not present on the first - branch. -} changed :: Branch -> Branch -> Repo -> IO Bool |