From e3d1be4237b831b517a54c70ae3c4ec3840345a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ren=C3=A9=20Scharfe?= Date: Sat, 18 Jun 2022 13:12:28 +0200 Subject: [PATCH] combine-diff: abort if --ignore-matching-lines is given MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- combine-diff.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.11.4.GIT