diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-04-29 14:59:49 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-04-29 14:59:49 -0400 |
commit | 36852d90bc18cb7b2bddb1ce9dce39cc1f0203de (patch) | |
tree | 0419a1d67f6bb9db4ce79f8cb76b53752e2d7371 /Git/Branch.hs | |
parent | efe7e174bfab4d0dd2e88e7b6eb859940b2228ea (diff) | |
download | git-repair-36852d90bc18cb7b2bddb1ce9dce39cc1f0203de.tar.gz |
Merge from git-annex.
Diffstat (limited to 'Git/Branch.hs')
-rw-r--r-- | Git/Branch.hs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Git/Branch.hs b/Git/Branch.hs index 5c6135d..a2225dc 100644 --- a/Git/Branch.hs +++ b/Git/Branch.hs @@ -1,6 +1,6 @@ {- git branch stuff - - - Copyright 2011 Joey Hess <joey@kitenet.net> + - Copyright 2011 Joey Hess <id@joeyh.name> - - Licensed under the GNU GPL version 3 or higher. -} @@ -37,15 +37,12 @@ current r = do {- The current branch, which may not really exist yet. -} currentUnsafe :: Repo -> IO (Maybe Git.Ref) currentUnsafe r = parse . firstLine - <$> pipeReadStrict [Param "symbolic-ref", Param $ fromRef Git.Ref.headRef] r + <$> pipeReadStrict [Param "symbolic-ref", Param "-q", Param $ fromRef Git.Ref.headRef] r where parse l | null l = Nothing | otherwise = Just $ Git.Ref l -currentSha :: Repo -> IO (Maybe Git.Sha) -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. -} changed :: Branch -> Branch -> Repo -> IO Bool |