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

Re: [PATCH v5 01/10] t/t4209-log-pickaxe: Naming typo: -G takes a regex

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 13, 2025, 04:06 UTC
Message-ID
<xmqqbjv6qyiv.fsf@gitster.g>
In-Reply-To
<20250212032657.1807939-2-illia.bobyr@gmail.com>
Illia Bobyr <illia.bobyr@gmail.com> writes:
> Subject: Re: [PATCH v5 01/10] t/t4209-log-pickaxe: Naming typo: -G takes a regex

"Naming" -> "naming". It is even more preferable if you can avoid introducing the second colon. E.g.

    Subject: t/t4209: call the value given to -G <regex>, not <string>
This applies to the titles of all the patches in the series, I suspect?
> Not effect on the test logic, but as "-G" argument is a regex it is more
> accurate to use "regex" as a dummy argument value rather than "string".
> In all the other case when "-G" is passed a dummy value it is spelled as
> "regex" rather than as "string".

I guess the -G tests are copied-and-pasted from existing tests for the -S option when the -G option was introduced much later. This makes me wonder if we try to see what happens when a malformed regular expression is fed to the -G option (I didn't check---if we have no test for it, we might want to add one).

> ---
Missing sign-off.

Having said all that, I'd prefer to see the changes in one topic focused only to give --patch-grep and --patch-modifies synonyms to the existing option and do nothing else. Certainly a change like this is a distraction we do not have to discuss at the same time.

If you can group all these "preliminary clean-up" changes together into a separate series, without including any change to add the longhand to -S/-G, that is also a viable alternative approach. Once such a series graduates to 'master', then you'd do the longhand on top.

What we do not want is to see changes that are not directly necessary to add the longhand intermixed in the same series.

Show 15 quoted lines
>  t/t4209-log-pickaxe.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/t4209-log-pickaxe.sh b/t/t4209-log-pickaxe.sh
> index a675ac..ed70c 100755
> --- a/t/t4209-log-pickaxe.sh
> +++ b/t/t4209-log-pickaxe.sh
> @@ -89,7 +89,7 @@ test_expect_success 'usage: --no-pickaxe-regex' '
>  	test_expect_code 128 git log -Sstring --no-pickaxe-regex 2>actual &&
>  	test_cmp expect actual &&
>  
> -	test_expect_code 128 git log -Gstring --no-pickaxe-regex 2>err &&
> +	test_expect_code 128 git log -Gregex --no-pickaxe-regex 2>err &&
>  	test_cmp expect actual
>  '
Thanks.
Previous: Illia BobyrNext: Illia Bobyr
Message 22 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.