summaryrefslogtreecommitdiff
path: root/Git/Merge.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Git/Merge.hs')
-rw-r--r--Git/Merge.hs13
1 files changed, 9 insertions, 4 deletions
diff --git a/Git/Merge.hs b/Git/Merge.hs
index d661db978..12dfa7c1f 100644
--- a/Git/Merge.hs
+++ b/Git/Merge.hs
@@ -11,14 +11,19 @@ import Common
import Git
import Git.Command
import Git.BuildVersion
+import Git.Branch (CommitMode(..))
{- Avoids recent git's interactive merge. -}
-mergeNonInteractive :: Ref -> Repo -> IO Bool
-mergeNonInteractive branch
+mergeNonInteractive :: Ref -> CommitMode -> Repo -> IO Bool
+mergeNonInteractive branch commitmode
| older "1.7.7.6" = merge [Param $ fromRef branch]
- | otherwise = merge [Param "--no-edit", Param $ fromRef branch]
+ | otherwise = merge $ [Param "--no-edit", Param $ fromRef branch]
where
- merge ps = runBool $ Param "merge" : ps
+ merge ps = runBool $ cp ++ [Param "merge"] ++ ps
+ cp
+ | commitmode == AutomaticCommit =
+ [Param "-c", Param "commit.gpgsign=false"]
+ | otherwise = []
{- Stage the merge into the index, but do not commit it.-}
stageMerge :: Ref -> Repo -> IO Bool