Skip to content

Commit e3d1be4

Browse files
rscharfegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent dc8c8de commit e3d1be4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

combine-diff.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,6 +1498,10 @@ void diff_tree_combined(const struct object_id *oid,
14981498
int i, num_paths, needsep, show_log_first, num_parent = parents->nr;
14991499
int need_generic_pathscan;
15001500

1501+
if (opt->ignore_regex_nr)
1502+
die("combined diff and '%s' cannot be used together",
1503+
"--ignore-matching-lines");
1504+
15011505
/* nothing to do, if no parents */
15021506
if (!num_parent)
15031507
return;

0 commit comments

Comments
 (0)