Re: [PATCH 1/2] combine-diff: abort if --ignore-matching-lines is given

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



René Scharfe <l.s.r@xxxxxx> writes:

> 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@xxxxxx>
> ---
>  combine-diff.c | 4 ++++
>  1 file changed, 4 insertions(+)

Makes sense.

> diff --git a/combine-diff.c b/combine-diff.c
> index b724f02123..11df1d7f39 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");

"X cannot be used together _with_ Y" perhaps?

>  	/* nothing to do, if no parents */
>  	if (!num_parent)
>  		return;
> --
> 2.36.1




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux