run out of tree merge with --no-ff
This is how direct mode does it too, and somehow, for reasons that currently escape me, this makes git merge not care if it's run with an empty work tree.
This commit is contained in:
parent
60bdffe43e
commit
887ef93a7f
5 changed files with 20 additions and 12 deletions
|
@ -15,12 +15,15 @@ import Git.Branch (CommitMode(..))
|
|||
|
||||
{- Avoids recent git's interactive merge. -}
|
||||
mergeNonInteractive :: Ref -> CommitMode -> Repo -> IO Bool
|
||||
mergeNonInteractive branch commitmode
|
||||
mergeNonInteractive = mergeNonInteractive' []
|
||||
|
||||
mergeNonInteractive' :: [CommandParam] -> Ref -> CommitMode -> Repo -> IO Bool
|
||||
mergeNonInteractive' extraparams branch commitmode
|
||||
| older "1.7.7.6" = merge [Param $ fromRef branch]
|
||||
| otherwise = merge $ [Param "--no-edit", Param $ fromRef branch]
|
||||
where
|
||||
merge ps = runBool $ cp ++ [Param "merge"] ++ ps
|
||||
cp
|
||||
merge ps = runBool $ sp ++ [Param "merge"] ++ ps ++ extraparams
|
||||
sp
|
||||
| commitmode == AutomaticCommit =
|
||||
[Param "-c", Param "commit.gpgsign=false"]
|
||||
| otherwise = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue