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>

René Scharfe committed Jun 18, 2022 at 13:12 UTC e3d1be4237b831b517a54c70ae3c4ec3840345a4
1 file changed +4
combine-diff.c
+4
@@ -1498,6 +1498,10 @@ void diff_tree_combined(const struct object_id *oid,
1498 int i, num_paths, needsep, show_log_first, num_parent = parents->nr;
1499 int need_generic_pathscan;
1500
1501 + if (opt->ignore_regex_nr)
1502 + die("combined diff and '%s' cannot be used together",
1503 + "--ignore-matching-lines");
1504 +
1505 /* nothing to do, if no parents */
1506 if (!num_parent)
1507 return;