diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-04-06 18:40:28 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-04-06 18:40:28 -0400 |
commit | 9de9f5aad4ec0275e3c544fcb26588ea0e755760 (patch) | |
tree | 492124ae7448a3e287b0c1f4af855aec727c736b /Git | |
parent | 070b1a03392ab3962eb43f60f32fde5c1b9b70d2 (diff) |
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.
Diffstat (limited to 'Git')
-rw-r--r-- | Git/Merge.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Git/Merge.hs b/Git/Merge.hs index b3a048937..21eeaf181 100644 --- a/Git/Merge.hs +++ b/Git/Merge.hs @@ -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 = [] |