]> git.ipfire.org Git - thirdparty/git.git/commitdiff
combine-diff: abort if --ignore-matching-lines is given
authorRené Scharfe <l.s.r@web.de>
Sat, 18 Jun 2022 11:12:28 +0000 (13:12 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Jun 2022 16:56:30 +0000 (09:56 -0700)
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>
combine-diff.c

index d93782daeb37fee21f5898600ff15628b32d4779..512897e3bfe8f9842cd397a1b670e878a5bbffcf 100644 (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;