summaryrefslogtreecommitdiff
path: root/builtin/merge.c
diff options
context:
space:
mode:
authorLibravatar Sergey Organov <sorganov@gmail.com>2020-12-21 18:19:38 +0300
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-12-21 13:47:31 -0800
commit09322b1da92fd32204c8b4b07cf12decccfe47f3 (patch)
tree74698f04a0722bf2ab75f8af317b9225ba414860 /builtin/merge.c
parentdiff-merges: re-arrange functions to match the order they are called in (diff)
downloadtgif-09322b1da92fd32204c8b4b07cf12decccfe47f3.tar.xz
diff-merges: new function diff_merges_suppress()
This function sets all the relevant flags to disabled state, so that no code that checks only one of them get it wrong. Then we call this new function everywhere where diff merges output suppression is needed. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge.c')
-rw-r--r--builtin/merge.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index 9d5359edc2..1f7b69982b 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -14,6 +14,7 @@
#include "lockfile.h"
#include "run-command.h"
#include "diff.h"
+#include "diff-merges.h"
#include "refs.h"
#include "refspec.h"
#include "commit.h"
@@ -400,7 +401,7 @@ static void squash_message(struct commit *commit, struct commit_list *remotehead
printf(_("Squash commit -- not updating HEAD\n"));
repo_init_revisions(the_repository, &rev, NULL);
- rev.ignore_merges = 1;
+ diff_merges_suppress(&rev);
rev.commit_format = CMIT_FMT_MEDIUM;
commit->object.flags |= UNINTERESTING;