From c6979bd26106f1e13fb578a8dbad98cc108c1463 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 7 Feb 2015 01:04:38 +0100 Subject: [PATCH] merge: do not insert "--no-ff" for "--squash" --- commands/merge.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/merge.go b/commands/merge.go index 7b6559c8..5f1644b1 100644 --- a/commands/merge.go +++ b/commands/merge.go @@ -76,7 +76,7 @@ func transformMergeArgs(args *Args) error { mergeMsg := fmt.Sprintf("Merge pull request #%v from %s\n\n%s", id, mergeHead, pullRequest.Title) args.AppendParams(mergeHead, "-m", mergeMsg) - if args.IndexOfParam("--ff-only") == -1 { + if args.IndexOfParam("--ff-only") == -1 && args.IndexOfParam("--squash") == -1 { i := args.IndexOfParam("-m") args.InsertParam(i, "--no-ff") } -- GitLab