Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Organov <sorganov@gmail.com>2020-12-21 18:19:39 +0300
committerJunio C Hamano <gitster@pobox.com>2020-12-22 00:47:31 +0300
commit3b6c17b5c0bd126e3c712f5de909a033d99f1e3a (patch)
treeae28287b99d1f72a2edcd1c99943a3473bbd5efa /builtin/diff-files.c
parent09322b1da92fd32204c8b4b07cf12decccfe47f3 (diff)
diff-merges: new function diff_merges_set_dense_combined_if_unset()
Call it where given functionality is needed instead of direct checking/tweaking of diff merges related fields. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/diff-files.c')
-rw-r--r--builtin/diff-files.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/diff-files.c b/builtin/diff-files.c
index 1e352dd8f7..4742a4559b 100644
--- a/builtin/diff-files.c
+++ b/builtin/diff-files.c
@@ -7,6 +7,7 @@
#include "cache.h"
#include "config.h"
#include "diff.h"
+#include "diff-merges.h"
#include "commit.h"
#include "revision.h"
#include "builtin.h"
@@ -69,9 +70,9 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix)
* was not asked to. "diff-files -c -p" should not densify
* (the user should ask with "diff-files --cc" explicitly).
*/
- if (rev.max_count == -1 && !rev.combine_merges &&
+ if (rev.max_count == -1 &&
(rev.diffopt.output_format & DIFF_FORMAT_PATCH))
- rev.combine_merges = rev.dense_combined_merges = 1;
+ diff_merges_set_dense_combined_if_unset(&rev);
if (read_cache_preload(&rev.diffopt.pathspec) < 0) {
perror("read_cache_preload");