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:
authorRené Scharfe <l.s.r@web.de>2022-06-18 14:12:28 +0300
committerJunio C Hamano <gitster@pobox.com>2022-06-21 19:56:30 +0300
commite3d1be4237b831b517a54c70ae3c4ec3840345a4 (patch)
treed80fe0437764c398f3753567966728b42813c520 /combine-diff.c
parentdc8c8deaa6b5847733bd7df011a4c7b7d1a64e0a (diff)
combine-diff: abort if --ignore-matching-lines is given
The code for combined diffs doesn't currently support ignoring changes that match a regex. Abort and report that fact instead of running into a segfault. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'combine-diff.c')
-rw-r--r--combine-diff.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/combine-diff.c b/combine-diff.c
index d93782daeb..512897e3bf 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -1498,6 +1498,10 @@ void diff_tree_combined(const struct object_id *oid,
int i, num_paths, needsep, show_log_first, num_parent = parents->nr;
int need_generic_pathscan;
+ if (opt->ignore_regex_nr)
+ die("combined diff and '%s' cannot be used together",
+ "--ignore-matching-lines");
+
/* nothing to do, if no parents */
if (!num_parent)
return;