git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, orygaw <orygaw@protonmail.com>,
	rsbecker@nexbridge.com, Taylor Blau <me@ttaylorr.com>
Subject: Re: [PATCH] log: require --grep for --invert-grep and --all-match, fix segfault
Date: Mon, 10 Oct 2022 15:00:34 -0400	[thread overview]
Message-ID: <Y0Rr0sQ91C/SgmBJ@nand.local> (raw)
In-Reply-To: <221010.86o7ujpl44.gmgdl@evledraar.gmail.com>

On Mon, Oct 10, 2022 at 08:48:25PM +0200, Ævar Arnfjörð Bjarmason wrote:
> The rationale for changing it this way is that the documentaion says:
>
> 	--all-match::
> 	        Limit the commits output to ones that match all given `--grep`,
> 	        instead of ones that match at least one.
> 	--invert-grep::
> 	        Limit the commits output to ones with log message that do not
> 	        match the pattern specified with `--grep=<pattern>`.

This does feel a little academic, but to me the documentation seems to
suggest that `--all-match` or `--invert-grep` should both support the
absence of a `--grep` argument.

At least in `--invert-grep`, my reading is "the pattern specified with
`--grep=<pattern>` [...if any]".

In any case, the behavior has been as such for long enough that it feels
like our documentation needs to be changed, and not the behavior itself.
On the other hand, I have a hard time imagining that many/any people
care about this particular behavior.

Thanks,
Taylor

  reply	other threads:[~2022-10-10 19:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-10 14:33 Git BUG 2.37.3 and 2.38.0 orygaw
2022-10-10 15:40 ` rsbecker
2022-10-10 15:48   ` Taylor Blau
2022-10-10 17:02     ` Junio C Hamano
2022-10-10 16:57 ` [PATCH] log: require --grep for --invert-grep and --all-match, fix segfault Ævar Arnfjörð Bjarmason
2022-10-10 17:34   ` Junio C Hamano
2022-10-10 17:45     ` Junio C Hamano
2022-10-10 18:48       ` Ævar Arnfjörð Bjarmason
2022-10-10 19:00         ` Taylor Blau [this message]
2022-10-11  9:48   ` [PATCH v2] grep.c: remove "extended" in favor of "pattern_expression", " Ævar Arnfjörð Bjarmason
2022-10-11 15:46     ` Junio C Hamano
2022-10-10 17:41 ` [PATCH 0/2] grep: tolerate NULL argument to free_grep_expr() Taylor Blau
2022-10-10 17:41   ` [PATCH 1/2] t4202: demonstrate `git log --invert-grep` segfault Taylor Blau
2022-10-10 17:41   ` [PATCH 2/2] grep.c: tolerate NULL grep_expr in free_pattern_expr() Taylor Blau
2022-10-10 17:54     ` Junio C Hamano
2022-10-10 18:10       ` Taylor Blau
2022-10-10 18:11       ` Junio C Hamano
2022-10-10 18:14         ` Taylor Blau

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

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

  git send-email \
    --in-reply-to=Y0Rr0sQ91C/SgmBJ@nand.local \
    --to=me@ttaylorr.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=orygaw@protonmail.com \
    --cc=rsbecker@nexbridge.com \
    /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.
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 NNTP newsgroup(s).