1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-08 23:46:08 +02:00

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>
This commit is contained in:
René Scharfe 2022-06-18 13:12:28 +02:00 committed by Junio C Hamano
parent dc8c8deaa6
commit e3d1be4237

View File

@ -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;