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

[PATCH v4 09/10] diff: --pickaxe-{all,regex} help: Add --patch-{grep,modifies}

From
Illia Bobyr <illia.bobyr@gmail.com>
Date
Feb 11, 2025, 08:50 UTC
Message-ID
<20250211085028.3923875-10-illia.bobyr@gmail.com>
In-Reply-To
<20250206014324.1839232-1-illia.bobyr@gmail.com>
For less experienced users --patch-{grep,modifies} should be easier to
understand than just -S or -G.  By mentioning the long argument names in
the help messages we save those users from having to search the list of
options for an explanation of what -S or -G stand for.
---
 diff.c | 4 ++--
 diff.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/diff.c b/diff.c
index ac2cd..a9e78 100644
--- a/diff.c
+++ b/diff.c
@@ -5871,10 +5871,10 @@ struct option *add_diff_options(const struct option *opts,
 			       N_("look for differences where a patch contains the specified regex"),
 			       0, diff_opt_pickaxe_regex),
 		OPT_BIT_F(0, "pickaxe-all", &options->pickaxe_opts,
-			  N_("show all changes in the changeset with -S or -G"),
+			  N_("show all changes in the changeset with -S/--patch-modifies or -G/--patch-grep"),
 			  DIFF_PICKAXE_ALL, PARSE_OPT_NONEG),
 		OPT_BIT_F(0, "pickaxe-regex", &options->pickaxe_opts,
-			  N_("treat <string> in -S as extended POSIX regular expression"),
+			  N_("treat <string> in -S/--patch-modifies as extended POSIX regular expression"),
 			  DIFF_PICKAXE_REGEX, PARSE_OPT_NONEG),
 		OPT_FILENAME('O', NULL, &options->orderfile,
 			     N_("control the order in which files appear in the output")),
diff --git a/diff.h b/diff.h
index ed48a..9ad37 100644
--- a/diff.h
+++ b/diff.h
@@ -613,9 +613,9 @@ void diffcore_fix_diff_index(void);
 "  --patch-modifies=<string>\n" \
 "                find filepair who differ in the number of occurrences of string.\n" \
 "  --pickaxe-grep\n" \
-"                treat <string> as a regex in the -S argument.\n" \
+"                treat <string> as a regex in the -S/--patch-modifies argument.\n" \
 "  --pickaxe-all\n" \
-"                show all files diff when -G or -S is used and hit is found.\n" \
+"                show all files diff for -G/--patch-grep and -S/--patch-modifies.\n" \
 "  -a  --text    treat all files as text.\n"
 
 int diff_queue_is_empty(struct diff_options *o);
-- 
2.45.2
Previous: Illia BobyrNext: Illia Bobyr
Message 18 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.