{"thread":{"id":"62512","subject":"[PATCH] diff: --pickaxe{,-grep} arg names for -S and -G","startedAt":"2024-11-19T03:28:08Z","lastAt":"2024-11-19T03:28:08Z","messageCount":1,"participants":["Illia Bobyr"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"507563","messageId":"20241119032755.3360365-1-illia.bobyr@gmail.com","threadId":"62512","inReplyTo":null,"subject":"[PATCH] diff: --pickaxe{,-grep} arg names for -S and -G","fromName":"Illia Bobyr","fromEmail":"illia.bobyr@gmail.com","sentAt":"2024-11-19T03:27:42Z","receivedAt":"2024-11-19T03:28:08Z","isPatch":true,"sender":{"key":"illia.bobyr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/694419?v=4"},"body":"Most arguments have both short and long versions.  Long versions are\neasier to read, especially in scripts and command history.\n\nTests that check just the option parsing are duplicated to check both\nshort and long argument options.  But more complex tests are updated to\nuse the long argument in order to improve the test readability.\nAssuming that the usage tests have already verified that both arguments\ninvoke the same underlying functionality.\n\nSigned-off-by: Illia Bobyr <illia.bobyr@gmail.com>\n---\n Documentation/diff-options.txt | 34 ++++++------\n Documentation/git-blame.txt    |  2 +-\n Documentation/gitdiffcore.txt  | 52 +++++++++---------\n diff.c                         | 12 +++--\n diff.h                         |  7 ++-\n gitk-git/gitk                  | 10 +++-\n t/t4062-diff-pickaxe.sh        |  8 +--\n t/t4209-log-pickaxe.sh         | 99 ++++++++++++++++++++++------------\n 8 files changed, 137 insertions(+), 87 deletions(-)\n\ndiff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\nindex cd0b8..d9d6a6 100644\n--- a/Documentation/diff-options.txt\n+++ b/Documentation/diff-options.txt\n@@ -650,6 +650,7 @@ Note that not all diffs can feature all types. For instance, copied and\n renamed entries cannot appear if detection for those types is disabled.\n \n -S<string>::\n+--pickaxe=<string>::\n \tLook for differences that change the number of occurrences of\n \tthe specified string (i.e. addition/deletion) in a file.\n \tIntended for the scripter's use.\n@@ -657,18 +658,19 @@ renamed entries cannot appear if detection for those types is disabled.\n It is useful when you're looking for an exact block of code (like a\n struct), and want to know the history of that block since it first\n came into being: use the feature iteratively to feed the interesting\n-block in the preimage back into `-S`, and keep going until you get the\n-very first version of the block.\n+block in the preimage back into `--pickaxe`, and keep going until you get\n+the very first version of the block.\n +\n Binary files are searched as well.\n \n -G<regex>::\n+--pickaxe-grep=<regex>::\n \tLook for differences whose patch text contains added/removed\n \tlines that match <regex>.\n +\n-To illustrate the difference between `-S<regex> --pickaxe-regex` and\n-`-G<regex>`, consider a commit with the following diff in the same\n-file:\n+To illustrate the difference between `--pickaxe=<regex> --pickaxe-regex`\n+and `--pickaxe-grep=<regex>`, consider a commit with the following diff in\n+the same file:\n +\n ----\n +    return frotz(nitfol, two->ptr, 1, 0);\n@@ -676,9 +678,9 @@ file:\n -    hit = frotz(nitfol, mf2.ptr, 1, 0);\n ----\n +\n-While `git log -G\"frotz\\(nitfol\"` will show this commit, `git log\n--S\"frotz\\(nitfol\" --pickaxe-regex` will not (because the number of\n-occurrences of that string did not change).\n+While `git log --pickaxe-grep=\"frotz\\(nitfol\"` will show this commit, `git\n+log --pickaxe=\"frotz\\(nitfol\" --pickaxe-regex` will not (because the\n+number of occurrences of that string did not change).\n +\n Unless `--text` is supplied patches of binary files without a textconv\n filter will be ignored.\n@@ -688,21 +690,21 @@ information.\n \n --find-object=<object-id>::\n \tLook for differences that change the number of occurrences of\n-\tthe specified object. Similar to `-S`, just the argument is different\n-\tin that it doesn't search for a specific string but for a specific\n-\tobject id.\n+\tthe specified object. Similar to `--pickaxe`, just the argument is\n+\tdifferent in that it doesn't search for a specific string but for a\n+\tspecific object id.\n +\n The object can be a blob or a submodule commit. It implies the `-t` option in\n `git-log` to also find trees.\n \n --pickaxe-all::\n-\tWhen `-S` or `-G` finds a change, show all the changes in that\n-\tchangeset, not just the files that contain the change\n-\tin <string>.\n+\tWhen `--pickaxe` or `--pickaxe-grep` finds a change, show all the\n+\tchanges in that changeset, not just the files that contain the\n+\tchange in <string>.\n \n --pickaxe-regex::\n-\tTreat the <string> given to `-S` as an extended POSIX regular\n-\texpression to match.\n+\tTreat the <string> given to `--pickaxe` as an extended POSIX\n+\tregular expression to match.\n \n endif::git-format-patch[]\n \ndiff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt\nindex b1d7fb..e455e9 100644\n--- a/Documentation/git-blame.txt\n+++ b/Documentation/git-blame.txt\n@@ -41,7 +41,7 @@ a text string in the diff. A small example of the pickaxe interface\n that searches for `blame_usage`:\n \n -----------------------------------------------------------------------------\n-$ git log --pretty=oneline -S'blame_usage'\n+$ git log --pretty=oneline --pickaxe='blame_usage'\n 5040f17eba15504bad66b14a645bddd9b015ebb7 blame -S <ancestry-file>\n ea4c7f9bf69e781dd0cd88d2bccb2bf5cc15c9a7 git-blame: Make the output\n -----------------------------------------------------------------------------\ndiff --git a/Documentation/gitdiffcore.txt b/Documentation/gitdiffcore.txt\nindex 642c5..f3f48 100644\n--- a/Documentation/gitdiffcore.txt\n+++ b/Documentation/gitdiffcore.txt\n@@ -245,32 +245,32 @@ diffcore-pickaxe: For Detecting Addition/Deletion of Specified String\n \n This transformation limits the set of filepairs to those that change\n specified strings between the preimage and the postimage in a certain\n-way.  -S<block-of-text> and -G<regular-expression> options are used to\n-specify different ways these strings are sought.\n-\n-\"-S<block-of-text>\" detects filepairs whose preimage and postimage\n-have different number of occurrences of the specified block of text.\n-By definition, it will not detect in-file moves.  Also, when a\n-changeset moves a file wholesale without affecting the interesting\n-string, diffcore-rename kicks in as usual, and `-S` omits the filepair\n-(since the number of occurrences of that string didn't change in that\n-rename-detected filepair).  When used with `--pickaxe-regex`, treat\n-the <block-of-text> as an extended POSIX regular expression to match,\n-instead of a literal string.\n-\n-\"-G<regular-expression>\" (mnemonic: grep) detects filepairs whose\n-textual diff has an added or a deleted line that matches the given\n-regular expression.  This means that it will detect in-file (or what\n-rename-detection considers the same file) moves, which is noise.  The\n-implementation runs diff twice and greps, and this can be quite\n-expensive.  To speed things up, binary files without textconv filters\n-will be ignored.\n-\n-When `-S` or `-G` are used without `--pickaxe-all`, only filepairs\n-that match their respective criterion are kept in the output.  When\n-`--pickaxe-all` is used, if even one filepair matches their respective\n-criterion in a changeset, the entire changeset is kept.  This behavior\n-is designed to make reviewing changes in the context of the whole\n+way.  --pickaxe=<block-of-text> and --pickaxe-grep=<regular-expression>\n+options are used to specify different ways these strings are sought.\n+\n+\"-S<block-of-text>\", or \"--pickaxe=<block-of-text>\" detects filepairs\n+whose preimage and postimage have different number of occurrences of the\n+specified block of text.  By definition, it will not detect in-file moves.\n+Also, when a changeset moves a file wholesale without affecting the\n+interesting string, diffcore-rename kicks in as usual, and `--pickaxe`\n+omits the filepair (since the number of occurrences of that string didn't\n+change in that rename-detected filepair).  When used with\n+`--pickaxe-regex`, treat the <block-of-text> as an extended POSIX regular\n+expression to match, instead of a literal string.\n+\n+\"-G<regular-expression>\", or \"--pickaxe-grep=<regular-expression>\"\n+(mnemonic: grep) detects filepairs whose textual diff has an added or a\n+deleted line that matches the given regular expression.  This means that\n+it will detect in-file (or what rename-detection considers the same file)\n+moves, which is noise.  The implementation runs diff twice and greps, and\n+this can be quite expensive.  To speed things up, binary files without\n+textconv filters will be ignored.\n+\n+When `--pickaxe` or `--pickaxe-grep` are used without `--pickaxe-all`,\n+only filepairs that match their respective criterion are kept in the\n+output.  When `--pickaxe-all` is used, if even one filepair matches their\n+respective criterion in a changeset, the entire changeset is kept.  This\n+behavior is designed to make reviewing changes in the context of the whole\n changeset easier.\n \n diffcore-order: For Sorting the Output Based on Filenames\ndiff --git a/diff.c b/diff.c\nindex 173cbe..73efe 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -4878,15 +4878,17 @@ void diff_setup_done(struct diff_options *options)\n \n \tif (HAS_MULTI_BITS(options->pickaxe_opts & DIFF_PICKAXE_KINDS_MASK))\n \t\tdie(_(\"options '%s', '%s', and '%s' cannot be used together\"),\n-\t\t\t\"-G\", \"-S\", \"--find-object\");\n+\t\t\t\"-G/--pickaxe-grep\", \"-S/--pickaxe\", \"--find-object\");\n \n \tif (HAS_MULTI_BITS(options->pickaxe_opts & DIFF_PICKAXE_KINDS_G_REGEX_MASK))\n \t\tdie(_(\"options '%s' and '%s' cannot be used together, use '%s' with '%s'\"),\n-\t\t\t\"-G\", \"--pickaxe-regex\", \"--pickaxe-regex\", \"-S\");\n+\t\t\t\"-G/--pickaxe-grep\", \"--pickaxe-regex\",\n+                        \"--pickaxe-regex\", \"-S/--pickaxe\");\n \n \tif (HAS_MULTI_BITS(options->pickaxe_opts & DIFF_PICKAXE_KINDS_ALL_OBJFIND_MASK))\n \t\tdie(_(\"options '%s' and '%s' cannot be used together, use '%s' with '%s' and '%s'\"),\n-\t\t\t\"--pickaxe-all\", \"--find-object\", \"--pickaxe-all\", \"-G\", \"-S\");\n+\t\t\t\"--pickaxe-all\", \"--find-object\",\n+                        \"--pickaxe-all\", \"-G/--pickaxe-grep\", \"-S/--pickaxe\");\n \n \t/*\n \t * Most of the time we can say \"there are changes\"\n@@ -5864,10 +5866,10 @@ struct option *add_diff_options(const struct option *opts,\n \t\tOPT_SET_INT_F(0, \"ita-visible-in-index\", &options->ita_invisible_in_index,\n \t\t\t      N_(\"treat 'git add -N' entries as real in the index\"),\n \t\t\t      0, PARSE_OPT_NONEG),\n-\t\tOPT_CALLBACK_F('S', NULL, options, N_(\"<string>\"),\n+\t\tOPT_CALLBACK_F('S', \"pickaxe\", options, N_(\"<string>\"),\n \t\t\t       N_(\"look for differences that change the number of occurrences of the specified string\"),\n \t\t\t       0, diff_opt_pickaxe_string),\n-\t\tOPT_CALLBACK_F('G', NULL, options, N_(\"<regex>\"),\n+\t\tOPT_CALLBACK_F('G', \"pickaxe-grep\", options, N_(\"<regex>\"),\n \t\t\t       N_(\"look for differences that change the number of occurrences of the specified regex\"),\n \t\t\t       0, diff_opt_pickaxe_regex),\n \t\tOPT_BIT_F(0, \"pickaxe-all\", &options->pickaxe_opts,\ndiff --git a/diff.h b/diff.h\nindex 0cde3..1fc17 100644\n--- a/diff.h\n+++ b/diff.h\n@@ -600,7 +600,12 @@ void diffcore_fix_diff_index(void);\n \"                try unchanged files as candidate for copy detection.\\n\" \\\n \"  -l<n>         limit rename attempts up to <n> paths.\\n\" \\\n \"  -O<file>      reorder diffs according to the <file>.\\n\" \\\n-\"  -S<string>    find filepair whose only one side contains the string.\\n\" \\\n+\"  -G<string>\\n\" \\\n+\"  --pickaxe-grep=<string>\\n\" \\\n+\"                find differences whose patch contains the string.\\n\" \\\n+\"  -S<string>\\n\" \\\n+\"  --pickaxe=<string>\\n\" \\\n+\"                find filepair whose only one side contains the string.\\n\" \\\n \"  --pickaxe-all\\n\" \\\n \"                show all files diff when -S is used and hit is found.\\n\" \\\n \"  -a  --text    treat all files as text.\\n\"\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex 7a087f..c83f6 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -228,7 +228,15 @@ proc parseviewargs {n arglist} {\n             \"--until=*\" - \"--before=*\" - \"--max-age=*\" - \"--min-age=*\" -\n             \"--author=*\" - \"--committer=*\" - \"--grep=*\" - \"-[iE]\" -\n             \"--remove-empty\" - \"--first-parent\" - \"--cherry-pick\" -\n-            \"-S*\" - \"-G*\" - \"--pickaxe-all\" - \"--pickaxe-regex\" -\n+            \"-S*\" - \"--pickaxe=*\" -\n+            \"--pickaxe\" {\n+              set nextisval 1\n+            }\n+            \"-G*\" - \"--pickaxe-grep=*\" -\n+            \"--pickaxe-grep\" {\n+              set nextisval 1\n+            }\n+            \"--pickaxe-all\" - \"--pickaxe-regex\" -\n             \"--simplify-by-decoration\" {\n                 # These mean that we get a subset of the commits\n                 set filtered 1\ndiff --git a/t/t4062-diff-pickaxe.sh b/t/t4062-diff-pickaxe.sh\nindex a90b4..ee87d3 100755\n--- a/t/t4062-diff-pickaxe.sh\n+++ b/t/t4062-diff-pickaxe.sh\n@@ -17,13 +17,13 @@ test_expect_success setup '\n '\n \n # OpenBSD only supports up to 255 repetitions, so repeat twice for 64*64=4096.\n-test_expect_success '-G matches' '\n-\tgit diff --name-only -G \"^(0{64}){64}$\" HEAD^ >out &&\n+test_expect_success '--pickaxe-grep matches' '\n+\tgit diff --name-only --pickaxe-grep \"^(0{64}){64}$\" HEAD^ >out &&\n \ttest 4096-zeroes.txt = \"$(cat out)\"\n '\n \n-test_expect_success '-S --pickaxe-regex' '\n-\tgit diff --name-only -S0 --pickaxe-regex HEAD^ >out &&\n+test_expect_success '--pickaxe --pickaxe-regex' '\n+\tgit diff --name-only --pickaxe 0 --pickaxe-regex HEAD^ >out &&\n \ttest 4096-zeroes.txt = \"$(cat out)\"\n '\n \ndiff --git a/t/t4209-log-pickaxe.sh b/t/t4209-log-pickaxe.sh\nindex b42fdc5..1efda 100755\n--- a/t/t4209-log-pickaxe.sh\n+++ b/t/t4209-log-pickaxe.sh\n@@ -1,6 +1,6 @@\n #!/bin/sh\n \n-test_description='log --grep/--author/--regexp-ignore-case/-S/-G'\n+test_description='log --grep/--author/--regexp-ignore-case/--pickaxe{,-grep}'\n \n TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n@@ -61,18 +61,39 @@ test_expect_success 'usage' '\n \ttest_expect_code 129 git log -S 2>err &&\n \ttest_grep \"switch.*requires a value\" err &&\n \n+\ttest_expect_code 129 git log --pickaxe 2>err &&\n+\ttest_grep \"option.*requires a value\" err &&\n+\n \ttest_expect_code 129 git log -G 2>err &&\n \ttest_grep \"switch.*requires a value\" err &&\n \n+\ttest_expect_code 129 git log --pickaxe-grep 2>err &&\n+\ttest_grep \"option.*requires a value\" err &&\n+\n \ttest_expect_code 128 git log -Gregex -Sstring 2>err &&\n \tgrep \"cannot be used together\" err &&\n \n+\ttest_expect_code 128 git log -Gregex --pickaxe string 2>err &&\n+\tgrep \"cannot be used together\" err &&\n+\n+\ttest_expect_code 128 git log --pickaxe-grep regex -Sstring 2>err &&\n+\tgrep \"cannot be used together\" err &&\n+\n+\ttest_expect_code 128 git log --pickaxe-grep regex --pickaxe string 2>err &&\n+\tgrep \"cannot be used together\" err &&\n+\n \ttest_expect_code 128 git log -Gregex --find-object=HEAD 2>err &&\n \tgrep \"cannot be used together\" err &&\n \n+\ttest_expect_code 128 git log --pickaxe-grep regex --find-object=HEAD 2>err &&\n+\tgrep \"cannot be used together\" err &&\n+\n \ttest_expect_code 128 git log -Sstring --find-object=HEAD 2>err &&\n \tgrep \"cannot be used together\" err &&\n \n+\ttest_expect_code 128 git log --pickaxe string --find-object=HEAD 2>err &&\n+\tgrep \"cannot be used together\" err &&\n+\n \ttest_expect_code 128 git log --pickaxe-all --find-object=HEAD 2>err &&\n \tgrep \"cannot be used together\" err\n '\n@@ -87,10 +108,10 @@ test_expect_success 'usage: --no-pickaxe-regex' '\n \tfatal: unrecognized argument: --no-pickaxe-regex\n \tEOF\n \n-\ttest_expect_code 128 git log -Sstring --no-pickaxe-regex 2>actual &&\n+\ttest_expect_code 128 git log --pickaxe string --no-pickaxe-regex 2>actual &&\n \ttest_cmp expect actual &&\n \n-\ttest_expect_code 128 git log -Gstring --no-pickaxe-regex 2>err &&\n+\ttest_expect_code 128 git log --pickaxe-grep string --no-pickaxe-regex 2>err &&\n \ttest_cmp expect actual\n '\n \n@@ -105,47 +126,59 @@ test_log_icase\texpect_second\t--author person\n test_log_icase\texpect_nomatch\t--author spreon\n \n test_log\texpect_nomatch\t-G picked\n+test_log\texpect_nomatch\t--pickaxe-grep picked\n test_log\texpect_second\t-G Picked\n+test_log\texpect_second\t--pickaxe-grep Picked\n test_log_icase\texpect_nomatch\t-G pickle\n+test_log_icase\texpect_nomatch\t--pickaxe-grep pickle\n test_log_icase\texpect_second\t-G picked\n+test_log_icase\texpect_second\t--pickaxe-grep picked\n \n-test_expect_success 'log -G --textconv (missing textconv tool)' '\n+test_expect_success 'log --pickaxe-grep --textconv (missing textconv tool)' '\n \techo \"* diff=test\" >.gitattributes &&\n-\ttest_must_fail git -c diff.test.textconv=missing log -Gfoo &&\n+\ttest_must_fail git -c diff.test.textconv=missing log --pickaxe-grep foo &&\n \trm .gitattributes\n '\n \n-test_expect_success 'log -G --no-textconv (missing textconv tool)' '\n+test_expect_success 'log --pickaxe-grep --no-textconv (missing textconv tool)' '\n \techo \"* diff=test\" >.gitattributes &&\n-\tgit -c diff.test.textconv=missing log -Gfoo --no-textconv >actual &&\n+\tgit -c diff.test.textconv=missing log --pickaxe-grep foo --no-textconv >actual &&\n \ttest_cmp expect_nomatch actual &&\n \trm .gitattributes\n '\n \n test_log\texpect_nomatch\t-S picked\n+test_log\texpect_nomatch\t--pickaxe  picked\n test_log\texpect_second\t-S Picked\n+test_log\texpect_second\t--pickaxe  Picked\n test_log_icase\texpect_second\t-S picked\n+test_log_icase\texpect_second\t--pickaxe  picked\n test_log_icase\texpect_nomatch\t-S pickle\n+test_log_icase\texpect_nomatch\t--pickaxe  pickle\n \n test_log\texpect_nomatch\t-S p.cked --pickaxe-regex\n+test_log\texpect_nomatch\t--pickaxe  p.cked --pickaxe-regex\n test_log\texpect_second\t-S P.cked --pickaxe-regex\n+test_log\texpect_second\t--pickaxe  P.cked --pickaxe-regex\n test_log_icase\texpect_second\t-S p.cked --pickaxe-regex\n+test_log_icase\texpect_second\t--pickaxe  p.cked --pickaxe-regex\n test_log_icase\texpect_nomatch\t-S p.ckle --pickaxe-regex\n+test_log_icase\texpect_nomatch\t--pickaxe  p.ckle --pickaxe-regex\n \n-test_expect_success 'log -S --textconv (missing textconv tool)' '\n+test_expect_success 'log --pickaxe --textconv (missing textconv tool)' '\n \techo \"* diff=test\" >.gitattributes &&\n-\ttest_must_fail git -c diff.test.textconv=missing log -Sfoo &&\n+\ttest_must_fail git -c diff.test.textconv=missing log --pickaxe foo &&\n \trm .gitattributes\n '\n \n-test_expect_success 'log -S --no-textconv (missing textconv tool)' '\n+test_expect_success 'log --pickaxe --no-textconv (missing textconv tool)' '\n \techo \"* diff=test\" >.gitattributes &&\n-\tgit -c diff.test.textconv=missing log -Sfoo --no-textconv >actual &&\n+\tgit -c diff.test.textconv=missing log --pickaxe foo --no-textconv >actual &&\n \ttest_cmp expect_nomatch actual &&\n \trm .gitattributes\n '\n \n-test_expect_success 'setup log -[GS] plain & regex' '\n+test_expect_success 'setup log --pickaxe{,-grep} plain & regex' '\n \ttest_create_repo GS-plain &&\n \ttest_commit -C GS-plain --append A data.txt \"a\" &&\n \ttest_commit -C GS-plain --append B data.txt \"a a\" &&\n@@ -160,31 +193,31 @@ test_expect_success 'setup log -[GS] plain & regex' '\n \tgit -C GS-plain log >full-log\n '\n \n-test_expect_success 'log -G trims diff new/old [-+]' '\n-\tgit -C GS-plain log -G\"[+-]a\" >log &&\n+test_expect_success 'log --pickaxe-grep trims diff new/old [-+]' '\n+\tgit -C GS-plain log --pickaxe-grep \"[+-]a\" >log &&\n \ttest_must_be_empty log &&\n-\tgit -C GS-plain log -G\"^a\" >log &&\n+\tgit -C GS-plain log --pickaxe-grep \"^a\" >log &&\n \ttest_cmp log A-to-B-then-E-log\n '\n \n-test_expect_success 'log -S<pat> is not a regex, but -S<pat> --pickaxe-regex is' '\n-\tgit -C GS-plain log -S\"a\" >log &&\n+test_expect_success 'log --pickaxe <pat> is not a regex, but --pickaxe <pat> --pickaxe-regex is' '\n+\tgit -C GS-plain log --pickaxe \"a\" >log &&\n \ttest_cmp log A-to-B-then-E-log &&\n \n-\tgit -C GS-plain log -S\"[a]\" >log &&\n+\tgit -C GS-plain log --pickaxe \"[a]\" >log &&\n \ttest_must_be_empty log &&\n \n-\tgit -C GS-plain log -S\"[a]\" --pickaxe-regex >log &&\n+\tgit -C GS-plain log --pickaxe \"[a]\" --pickaxe-regex >log &&\n \ttest_cmp log A-to-B-then-E-log &&\n \n-\tgit -C GS-plain log -S\"[b]\" >log &&\n+\tgit -C GS-plain log --pickaxe \"[b]\" >log &&\n \ttest_cmp log D-then-E-log &&\n \n-\tgit -C GS-plain log -S\"[b]\" --pickaxe-regex >log &&\n+\tgit -C GS-plain log --pickaxe \"[b]\" --pickaxe-regex >log &&\n \ttest_cmp log C-to-D-then-E-log\n '\n \n-test_expect_success 'setup log -[GS] binary & --text' '\n+test_expect_success 'setup log --pickaxe{,-grep} binary & --text' '\n \ttest_create_repo GS-bin-txt &&\n \ttest_commit -C GS-bin-txt --printf A data.bin \"a\\na\\0a\\n\" &&\n \ttest_commit -C GS-bin-txt --append --printf B data.bin \"a\\na\\0a\\n\" &&\n@@ -192,36 +225,36 @@ test_expect_success 'setup log -[GS] binary & --text' '\n \tgit -C GS-bin-txt log >full-log\n '\n \n-test_expect_success 'log -G ignores binary files' '\n-\tgit -C GS-bin-txt log -Ga >log &&\n+test_expect_success 'log --pickaxe-grep ignores binary files' '\n+\tgit -C GS-bin-txt log --pickaxe-grep a >log &&\n \ttest_must_be_empty log\n '\n \n-test_expect_success 'log -G looks into binary files with -a' '\n-\tgit -C GS-bin-txt log -a -Ga >log &&\n+test_expect_success 'log --pickaxe-grep looks into binary files with -a' '\n+\tgit -C GS-bin-txt log -a --pickaxe-grep a >log &&\n \ttest_cmp log full-log\n '\n \n-test_expect_success 'log -G looks into binary files with textconv filter' '\n+test_expect_success 'log --pickaxe-grep looks into binary files with textconv filter' '\n \ttest_when_finished \"rm GS-bin-txt/.gitattributes\" &&\n \t(\n \t\tcd GS-bin-txt &&\n \t\techo \"* diff=bin\" >.gitattributes &&\n-\t\tgit -c diff.bin.textconv=cat log -Ga >../log\n+\t\tgit -c diff.bin.textconv=cat log --pickaxe-grep a >../log\n \t) &&\n \ttest_cmp log full-log\n '\n \n-test_expect_success 'log -S looks into binary files' '\n-\tgit -C GS-bin-txt log -Sa >log &&\n+test_expect_success 'log --pickaxe looks into binary files' '\n+\tgit -C GS-bin-txt log --pickaxe a >log &&\n \ttest_cmp log full-log\n '\n \n-test_expect_success 'log -S --pickaxe-regex looks into binary files' '\n-\tgit -C GS-bin-txt log --pickaxe-regex -Sa >log &&\n+test_expect_success 'log --pickaxe --pickaxe-regex looks into binary files' '\n+\tgit -C GS-bin-txt log --pickaxe-regex --pickaxe a >log &&\n \ttest_cmp log full-log &&\n \n-\tgit -C GS-bin-txt log --pickaxe-regex -S\"[a]\" >log &&\n+\tgit -C GS-bin-txt log --pickaxe-regex --pickaxe \"[a]\" >log &&\n \ttest_cmp log full-log\n '\n \n-- \n2.45.2\n\n"}]}