git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Long names for `git log -S` and `git log -G`

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 22, 2024, 10:51 UTC
Message-ID
<xmqqserjsfrq.fsf@gitster.g>
In-Reply-To
<470fe577-b26d-4393-8fa6-8f73ca4302de@gmail.com>
Illia Bobyr <illia.bobyr@gmail.com> writes:
Show 13 quoted lines
> On 11/18/24 19:52, Junio C Hamano wrote:
>>> `--pickaxe-grep` for `-G` seems like a reasonable alternative name for `-G`.
>> That is probably OK (even though "-G" is not exactly what the
>> pickaxe machinery wants to do; "--grep-in-patch" might be closer to
>> the intent).
> Imagining, that I am starting from scratch for this functionality, I think I
> would also consider "patch".  Though, as we have 4 related argument names, I
> wonder if using it as a prefix would create a more consistent UX.
>
> Something like:
>
> "--patch-grep" for "-G"
> "--patch-modifies" for "-S"

Ahh, "modifies" is a great verb. It sounds quite logical, but "-S" does not have to genereate a patch internally for it to work, so "--patch-modifies" is a bit of white lie.

> "--patch-search-show-all"/"--patch-show-all" for "--pickaxe-all"
> "--patch-search-regex"/"--patch-regex" for "--pickaxe-regex"

These already have their own established long names, so it is outside the scope of this topic, and I doubt it is worth giving these additional aliases (as you seem to agree).

Previous: Illia BobyrNext: Illia Bobyr
Message 5 of 8 in “Long names for `git log -S` and `git log -G`”
  1. Illia BobyrNov 18, 2024
  2. Junio C HamanoNov 19, 2024
  3. Jeff KingNov 19, 2024
  4. Illia BobyrNov 21, 2024
  5. Junio C HamanoNov 22, 2024
  6. 0/1 Long names for `git log -S` and `git log -G`Illia Bobyr, Feb 5, 2025
  7. 1/1 diff: --patch{-modifies,grep} arg names for -S and -GIllia Bobyr, Feb 5, 2025
  8. Johannes SixtFeb 5, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.