git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	git@vger.kernel.org, "Michał Kępień" <michal@isc.org>
Subject: Re: [PATCH 1/2] combine-diff: abort if --ignore-matching-lines is given
Date: Tue, 21 Jun 2022 08:35:35 -0700	[thread overview]
Message-ID: <xmqqedzijago.fsf@gitster.g> (raw)
In-Reply-To: <49bcadd1-7dc2-d5ee-36a5-59456450aeca@web.de> ("René Scharfe"'s message of "Sat, 18 Jun 2022 13:12:28 +0200")

René Scharfe <l.s.r@web.de> 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@web.de>
> ---
>  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

  reply	other threads:[~2022-06-21 15:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-14  9:32 Bug: combined diff with --ignore-matching-lines René Scharfe
2022-05-23 18:31 ` [PATCH] diff: fix a segfault in >2 tree -I<regex> and --output=<file> Ævar Arnfjörð Bjarmason
2022-05-23 20:08   ` Junio C Hamano
2022-05-24 11:38     ` Ævar Arnfjörð Bjarmason
2022-05-24 19:38       ` Junio C Hamano
2022-05-24 20:17         ` Ævar Arnfjörð Bjarmason
2022-06-18 11:12           ` René Scharfe
2022-06-18 11:12           ` [PATCH 1/2] combine-diff: abort if --ignore-matching-lines is given René Scharfe
2022-06-21 15:35             ` Junio C Hamano [this message]
2022-06-21 15:58               ` René Scharfe
2022-06-21 16:55                 ` Junio C Hamano
2022-06-18 11:12           ` [PATCH 2/2] combine-diff: abort if --output " René Scharfe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqedzijago.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    --cc=michal@isc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).