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

Re: [PATCH v3 1/1] diff: --patch-{modifies,grep} arg names for -S and -G

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 12, 2025, 17:08 UTC
Message-ID
<xmqq8qqbum49.fsf@gitster.g>
In-Reply-To
<081272b5-b035-47a6-a951-eb923a9a5833@gmail.com>
Illia Bobyr <illia.bobyr@gmail.com> writes:
Show 5 quoted lines
> My thinking is that as long version names improve readability, it also
> applies
> to the test code.  When I see a short option, I often have to check
> the manual
> to remember what exactly does it do.

But by now due to enough exposure, you have committed them in your memory, no? ;-)

> But, I think, I understand your point of view as well.

Yup, if the options were introduced with long and short forms at the same time and the tests were written at the same time or shortly after their introduction, I'd agree that using longer form more may be beneficial, since there is nobody who is already familier with either of the forms. But at this point after 20 years, swapping one for the other is mostly unnecessary churn, I would have to say (and I do not particularly want to having to repeat saying the same thing again).

Show 7 quoted lines
>> OK.  NOte that this says <regex>.  We may want to have a separate
>   clean-up
>> patch so that Documentation/gitdifcore.txt that used <regular-expression>
>> and the placeholder used here match.
>
> Makes sense.
> I've added this fix as patch 5 in v5.

I'd rather see these "fixes to existing anomalies" done totally outside of this series. IOW, I'd prefer to either (1) get the series done with the minimally necessary changes first and then after the dust settles from merging that to 'master', see these "oh we noticed these issues while working on the other series that has now completed" issues addressed, or (2) do the clean-up of existing anomalies first as a separate series, and then after the dust settles for the clean-up, do the proposed addition of longform as a separate series. I have slight preference to (1), simply because nobody complained on these small anomalies for the past 20 years ;-) but I can also go with "preliminary clean-up first" route.

Show 5 quoted lines
>> This is an unrelated change that should not be in this patch.  If
>> you want to modify it, please do it in a separate clean-up patch,
>> just like the above <regex> vs <regular-expression> change.
>
> Split it into patch 2 in v5.

Again, when I said "unrelated", I meant that I want them to be treated as unrelated changes, addressed outside of this series, either in a preliminary clean-up, or after-the-dust-settles clean-up.

Thanks.
Previous: Illia BobyrNext: Junio C Hamano
Message 5 of 36 in “Long names for `git log -S` and `git log -G`”
  1. 0/1 Long names for `git log -S` and `git log -G`Illia Bobyr, Feb 6, 2025
  2. 1/1 diff: --patch-{modifies,grep} arg names for -S and -GIllia Bobyr, Feb 6, 2025
  3. Junio C HamanoFeb 6, 2025
  4. Illia BobyrFeb 12, 2025
  5. Junio C HamanoFeb 12, 2025
  6. Junio C HamanoFeb 6, 2025
  7. 0/10 Long names for `git log -S` and `git log -G`Illia Bobyr, Feb 11, 2025
  8. Junio C HamanoFeb 11, 2025
  9. Illia BobyrFeb 12, 2025
  10. 01/10 t/t4209-log-pickaxe: Naming typo: -G takes a regexIllia Bobyr, Feb 11, 2025
  11. 02/10 diff: -G description: Correct copy/paste errorIllia Bobyr, Feb 11, 2025
  12. 03/10 diff: short help: Correct -S descriptionIllia Bobyr, Feb 11, 2025
  13. 04/10 diff: short help: Add -G and --pickaxe-grepIllia Bobyr, Feb 11, 2025
  14. 05/10 docs: gitdiffcore: -G and -S: Use regex/string placeholdersIllia Bobyr, Feb 11, 2025
  15. 06/10 diff: --patch-{grep,modifies} arg names for -G and -SIllia Bobyr, Feb 11, 2025
  16. 07/10 completion: Support --patch-{grep,modifies}Illia Bobyr, Feb 11, 2025
  17. 08/10 diff: test: Use --patch-{grep,modifies} over -G/-SIllia Bobyr, Feb 11, 2025
  18. 09/10 diff: --pickaxe-{all,regex} help: Add --patch-{grep,modifies}Illia Bobyr, Feb 11, 2025
  19. 10/10 diff: docs: Use --patch-{grep,modifies} over -G/-SIllia Bobyr, Feb 11, 2025
  20. 00/10 Long names for `git log -S` and `git log -G`Illia Bobyr, Feb 12, 2025
  21. 01/10 t/t4209-log-pickaxe: Naming typo: -G takes a regexIllia Bobyr, Feb 12, 2025
  22. Junio C HamanoFeb 13, 2025
  23. 02/10 diff: -G description: Correct copy/paste errorIllia Bobyr, Feb 12, 2025
  24. Junio C HamanoFeb 13, 2025
  25. 04/10 diff: short help: Add -G and --pickaxe-grepIllia Bobyr, Feb 12, 2025
  26. 03/10 diff: short help: Correct -S descriptionIllia Bobyr, Feb 12, 2025
  27. Junio C HamanoFeb 13, 2025
  28. 05/10 docs: gitdiffcore: -G and -S: Use regex/string placeholdersIllia Bobyr, Feb 12, 2025
  29. Junio C HamanoFeb 13, 2025
  30. 06/10 diff: --patch-{grep,modifies} arg names for -G and -SIllia Bobyr, Feb 12, 2025
  31. Junio C HamanoFeb 13, 2025
  32. 07/10 completion: Support --patch-{grep,modifies}Illia Bobyr, Feb 12, 2025
  33. Junio C HamanoFeb 13, 2025
  34. 08/10 diff: test: Use --patch-{grep,modifies} over -G/-SIllia Bobyr, Feb 12, 2025
  35. 09/10 diff: --pickaxe-{all,regex} help: Add --patch-{grep,modifies}Illia Bobyr, Feb 12, 2025
  36. 10/10 diff: docs: Use --patch-{grep,modifies} over -G/-SIllia Bobyr, Feb 12, 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.