split more stuff out of Git.hs

This commit is contained in:
Joey Hess 2011-12-14 15:30:14 -04:00
parent 2b24e16a63
commit 02f1bd2bf4
20 changed files with 197 additions and 179 deletions

View file

@ -11,6 +11,7 @@ import qualified Data.ByteString.Lazy.Char8 as L
import Common
import Git
import Git.Sha
{- Checks if the second branch has any commits not present on the first
- branch. -}
@ -19,7 +20,7 @@ changed origbranch newbranch repo
| origbranch == newbranch = return False
| otherwise = not . L.null <$> diffs
where
diffs = Git.pipeRead
diffs = pipeRead
[ Param "log"
, Param (show origbranch ++ ".." ++ show newbranch)
, Params "--oneline -n1"
@ -44,7 +45,7 @@ fastForward branch (first:rest) repo = do
where
no_ff = return False
do_ff to = do
Git.run "update-ref"
run "update-ref"
[Param $ show branch, Param $ show to] repo
return True
findbest c [] = return $ Just c