{"thread":{"id":"57522","subject":"[PATCH] name-rev: make --stdin hidden","startedAt":"2022-03-08T21:24:43Z","lastAt":"2023-05-06T12:38:40Z","messageCount":9,"participants":["John Cai via GitGitGadget","Junio C Hamano","John Cai","Eric Sunshine","Teng Long"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"450774","messageId":"pull.1225.git.git.1646774677277.gitgitgadget@gmail.com","threadId":"57522","inReplyTo":null,"subject":"[PATCH] name-rev: make --stdin hidden","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-03-08T21:24:37Z","receivedAt":"2022-03-08T21:24:43Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nIn 34ae3b70 (name-rev: deprecate --stdin in favor of --annotate-stdin),\nwe renamed --stdin to --annotate-stdin for the sake of a clearer name\nfor the option, and added text that indicates --stdin is deprecated. The\nnext step is to hide --stdin completely.\n\nMake the option hidden. Also, update documentation to remove all\nmentions of --stdin.\n\nSigned-off-by: \"John Cai\" <johncai86@gmail.com>\n---\n    name-rev: make --stdin hidden\n    \n    The next step of replacing name-rev --stdin with --annotate-stdin is to\n    make --stdin hidden. This patch also updates documentation to get rid of\n    any mention of --stdin.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1225%2Fjohn-cai%2Fjc%2Fhide-name-rev-stdin-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1225/john-cai/jc/hide-name-rev-stdin-v1\nPull-Request: https://github.com/git/git/pull/1225\n\n Documentation/git-name-rev.txt | 8 ++------\n builtin/name-rev.c             | 6 +++++-\n 2 files changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt\nindex ec8a27ce8bf..5f196c03708 100644\n--- a/Documentation/git-name-rev.txt\n+++ b/Documentation/git-name-rev.txt\n@@ -10,7 +10,7 @@ SYNOPSIS\n --------\n [verse]\n 'git name-rev' [--tags] [--refs=<pattern>]\n-\t       ( --all | --stdin | <commit-ish>... )\n+\t       ( --all | --annotate-stdin | <commit-ish>... )\n \n DESCRIPTION\n -----------\n@@ -70,10 +70,6 @@ The full name after substitution is master,\n while its tree object is 70d105cc79e63b81cfdcb08a15297c23e60b07ad\n -----------\n \n---stdin::\n-\tThis option is deprecated in favor of 'git name-rev --annotate-stdin'.\n-\tThey are functionally equivalent.\n-\n --name-only::\n \tInstead of printing both the SHA-1 and the name, print only\n \tthe name.  If given with --tags the usual tag prefix of\n@@ -107,7 +103,7 @@ Now you are wiser, because you know that it happened 940 revisions before v0.99.\n Another nice thing you can do is:\n \n ------------\n-% git log | git name-rev --stdin\n+% git log | git name-rev --annotate-stdin\n ------------\n \n GIT\ndiff --git a/builtin/name-rev.c b/builtin/name-rev.c\nindex 929591269dd..2389e7f752d 100644\n--- a/builtin/name-rev.c\n+++ b/builtin/name-rev.c\n@@ -538,7 +538,11 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)\n \t\t\t\t   N_(\"ignore refs matching <pattern>\")),\n \t\tOPT_GROUP(\"\"),\n \t\tOPT_BOOL(0, \"all\", &all, N_(\"list all commits reachable from all refs\")),\n-\t\tOPT_BOOL(0, \"stdin\", &transform_stdin, N_(\"deprecated: use annotate-stdin instead\")),\n+\t\tOPT_BOOL_F(0,\n+\t\t\t   \"stdin\",\n+\t\t\t   &transform_stdin,\n+\t\t\t   N_(\"deprecated: use annotate-stdin instead\"),\n+\t\t\t   PARSE_OPT_HIDDEN),\n \t\tOPT_BOOL(0, \"annotate-stdin\", &annotate_stdin, N_(\"annotate text from stdin\")),\n \t\tOPT_BOOL(0, \"undefined\", &allow_undefined, N_(\"allow to print `undefined` names (default)\")),\n \t\tOPT_BOOL(0, \"always\",     &always,\n\nbase-commit: c2162907e9aa884bdb70208389cb99b181620d51\n-- \ngitgitgadget\n"},{"id":"450903","messageId":"xmqqo82fklb9.fsf@gitster.g","threadId":"57522","inReplyTo":"pull.1225.git.git.1646774677277.gitgitgadget@gmail.com","subject":"Re: [PATCH] name-rev: make --stdin hidden","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-03-09T18:55:22Z","receivedAt":"2022-03-09T18:55:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"John Cai via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: John Cai <johncai86@gmail.com>\n>\n> In 34ae3b70 (name-rev: deprecate --stdin in favor of --annotate-stdin),\n> we renamed --stdin to --annotate-stdin for the sake of a clearer name\n> for the option, and added text that indicates --stdin is deprecated. The\n> next step is to hide --stdin completely.\n\nMay be.  As 34ae3b70 is not even in any released version yet, it is\na bit premature to talk about \"The next step\".  Perhaps hold onto\nthis change for a few releases?\n\nThanks.\n"},{"id":"450913","messageId":"F2D6D044-395F-40B6-9FBE-20B635A00741@gmail.com","threadId":"57522","inReplyTo":"xmqqo82fklb9.fsf@gitster.g","subject":"Re: [PATCH] name-rev: make --stdin hidden","fromName":"John Cai","fromEmail":"johncai86@gmail.com","sentAt":"2022-03-09T19:20:50Z","receivedAt":"2022-03-09T19:21:10Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"Hi Junio\n\nOn 9 Mar 2022, at 13:55, Junio C Hamano wrote:\n\n> \"John Cai via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n>> From: John Cai <johncai86@gmail.com>\n>>\n>> In 34ae3b70 (name-rev: deprecate --stdin in favor of --annotate-stdin),\n>> we renamed --stdin to --annotate-stdin for the sake of a clearer name\n>> for the option, and added text that indicates --stdin is deprecated. The\n>> next step is to hide --stdin completely.\n>\n> May be.  As 34ae3b70 is not even in any released version yet, it is\n> a bit premature to talk about \"The next step\".  Perhaps hold onto\n> this change for a few releases?\n\nSounds good. I may have been over-eager :)\n\n>\n> Thanks.\n"},{"id":"476643","messageId":"pull.1225.v2.git.git.1683314270964.gitgitgadget@gmail.com","threadId":"57522","inReplyTo":"pull.1225.git.git.1646774677277.gitgitgadget@gmail.com","subject":"[PATCH v2] name-rev: make --stdin hidden","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-05T19:17:50Z","receivedAt":"2023-05-05T19:17:57Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nIn 34ae3b70 (name-rev: deprecate --stdin in favor of --annotate-stdin),\nwe renamed --stdin to --annotate-stdin for the sake of a clearer name\nfor the option, and added text that indicates --stdin is deprecated. The\nnext step is to hide --stdin completely.\n\nMake the option hidden. Also, update documentation to remove all\nmentions of --stdin.\n\nSigned-off-by: \"John Cai\" <johncai86@gmail.com>\n---\n    name-rev: make --stdin hidden\n    \n    Now that --stdin has been deprecated for several releases, the next step\n    of replacing name-rev --stdin with --annotate-stdin is to make --stdin\n    hidden. This patch also updates documentation to get rid of any mention\n    of --stdin.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1225%2Fjohn-cai%2Fjc%2Fhide-name-rev-stdin-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1225/john-cai/jc/hide-name-rev-stdin-v2\nPull-Request: https://github.com/git/git/pull/1225\n\nRange-diff vs v1:\n\n 1:  32c8db2f03a ! 1:  904cd2c3572 name-rev: make --stdin hidden\n     @@ builtin/name-rev.c: int cmd_name_rev(int argc, const char **argv, const char *pr\n       \t\t\t\t   N_(\"ignore refs matching <pattern>\")),\n       \t\tOPT_GROUP(\"\"),\n       \t\tOPT_BOOL(0, \"all\", &all, N_(\"list all commits reachable from all refs\")),\n     --\t\tOPT_BOOL(0, \"stdin\", &transform_stdin, N_(\"deprecated: use annotate-stdin instead\")),\n     +-\t\tOPT_BOOL(0, \"stdin\", &transform_stdin, N_(\"deprecated: use --annotate-stdin instead\")),\n      +\t\tOPT_BOOL_F(0,\n      +\t\t\t   \"stdin\",\n      +\t\t\t   &transform_stdin,\n     -+\t\t\t   N_(\"deprecated: use annotate-stdin instead\"),\n     ++\t\t\t   N_(\"deprecated: use --annotate-stdin instead\"),\n      +\t\t\t   PARSE_OPT_HIDDEN),\n       \t\tOPT_BOOL(0, \"annotate-stdin\", &annotate_stdin, N_(\"annotate text from stdin\")),\n       \t\tOPT_BOOL(0, \"undefined\", &allow_undefined, N_(\"allow to print `undefined` names (default)\")),\n\n\n Documentation/git-name-rev.txt | 8 ++------\n builtin/name-rev.c             | 6 +++++-\n 2 files changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt\nindex ec8a27ce8bf..5f196c03708 100644\n--- a/Documentation/git-name-rev.txt\n+++ b/Documentation/git-name-rev.txt\n@@ -10,7 +10,7 @@ SYNOPSIS\n --------\n [verse]\n 'git name-rev' [--tags] [--refs=<pattern>]\n-\t       ( --all | --stdin | <commit-ish>... )\n+\t       ( --all | --annotate-stdin | <commit-ish>... )\n \n DESCRIPTION\n -----------\n@@ -70,10 +70,6 @@ The full name after substitution is master,\n while its tree object is 70d105cc79e63b81cfdcb08a15297c23e60b07ad\n -----------\n \n---stdin::\n-\tThis option is deprecated in favor of 'git name-rev --annotate-stdin'.\n-\tThey are functionally equivalent.\n-\n --name-only::\n \tInstead of printing both the SHA-1 and the name, print only\n \tthe name.  If given with --tags the usual tag prefix of\n@@ -107,7 +103,7 @@ Now you are wiser, because you know that it happened 940 revisions before v0.99.\n Another nice thing you can do is:\n \n ------------\n-% git log | git name-rev --stdin\n+% git log | git name-rev --annotate-stdin\n ------------\n \n GIT\ndiff --git a/builtin/name-rev.c b/builtin/name-rev.c\nindex 593f0506a10..4d15a23fc4d 100644\n--- a/builtin/name-rev.c\n+++ b/builtin/name-rev.c\n@@ -573,7 +573,11 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)\n \t\t\t\t   N_(\"ignore refs matching <pattern>\")),\n \t\tOPT_GROUP(\"\"),\n \t\tOPT_BOOL(0, \"all\", &all, N_(\"list all commits reachable from all refs\")),\n-\t\tOPT_BOOL(0, \"stdin\", &transform_stdin, N_(\"deprecated: use --annotate-stdin instead\")),\n+\t\tOPT_BOOL_F(0,\n+\t\t\t   \"stdin\",\n+\t\t\t   &transform_stdin,\n+\t\t\t   N_(\"deprecated: use --annotate-stdin instead\"),\n+\t\t\t   PARSE_OPT_HIDDEN),\n \t\tOPT_BOOL(0, \"annotate-stdin\", &annotate_stdin, N_(\"annotate text from stdin\")),\n \t\tOPT_BOOL(0, \"undefined\", &allow_undefined, N_(\"allow to print `undefined` names (default)\")),\n \t\tOPT_BOOL(0, \"always\",     &always,\n\nbase-commit: 69c786637d7a7fe3b2b8f7d989af095f5f49c3a8\n-- \ngitgitgadget\n"},{"id":"476644","messageId":"CAPig+cRRyMBQCiS7v0B1J+PSJFVVR++oOssrW7M3xwXS-2_jwQ@mail.gmail.com","threadId":"57522","inReplyTo":"pull.1225.v2.git.git.1683314270964.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] name-rev: make --stdin hidden","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2023-05-05T19:31:44Z","receivedAt":"2023-05-05T19:32:59Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Fri, May 5, 2023 at 3:19 PM John Cai via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n> In 34ae3b70 (name-rev: deprecate --stdin in favor of --annotate-stdin),\n> we renamed --stdin to --annotate-stdin for the sake of a clearer name\n> for the option, and added text that indicates --stdin is deprecated. The\n> next step is to hide --stdin completely.\n>\n> Make the option hidden. Also, update documentation to remove all\n> mentions of --stdin.\n\nEradicating all mention of --stdin from the documentation makes it\nmore hostile for end-users, doesn't it? If someone runs across --stdin\nin a blog post or in some in-the-wild script, then this makes it more\ndifficult to learn what the option does. In other such cases, rather\nthan purging all mention from documentation, we've instead mentioned\nthe deprecated option only as a minor aside of the option which\nreplaces it. For instance:\n\n    --annotate-stdin::\n        Transform stdin by ... omitting $hex altogether.\n        `--stdin` is a deprecated synonym.\n\n> Signed-off-by: \"John Cai\" <johncai86@gmail.com>\n"},{"id":"476645","messageId":"xmqqild6d0y0.fsf@gitster.g","threadId":"57522","inReplyTo":"pull.1225.v2.git.git.1683314270964.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] name-rev: make --stdin hidden","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-05-05T19:37:27Z","receivedAt":"2023-05-05T19:37:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"John Cai via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: John Cai <johncai86@gmail.com>\n>\n> In 34ae3b70 (name-rev: deprecate --stdin in favor of --annotate-stdin),\n> we renamed --stdin to --annotate-stdin for the sake of a clearer name\n> for the option, and added text that indicates --stdin is deprecated. The\n> next step is to hide --stdin completely.\n>\n> Make the option hidden. Also, update documentation to remove all\n> mentions of --stdin.\n>\n> Signed-off-by: \"John Cai\" <johncai86@gmail.com>\n> ---\n>     name-rev: make --stdin hidden\n>     \n>     Now that --stdin has been deprecated for several releases, the next step\n>     of replacing name-rev --stdin with --annotate-stdin is to make --stdin\n>     hidden. This patch also updates documentation to get rid of any mention\n>     of --stdin.\n\nNice.  It has been a year, and I agree that it is about time.\n\nThanks for not forgetting about the topic.\n\n>      -+\t\t\t   N_(\"deprecated: use annotate-stdin instead\"),\n>      ++\t\t\t   N_(\"deprecated: use --annotate-stdin instead\"),\n\nAnd of course this one is a very nice touch, relative to the\nprevious round.\n\n>       +\t\t\t   PARSE_OPT_HIDDEN),\n\n> diff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt\n> index ec8a27ce8bf..5f196c03708 100644\n> --- a/Documentation/git-name-rev.txt\n> +++ b/Documentation/git-name-rev.txt\n> @@ -10,7 +10,7 @@ SYNOPSIS\n>  --------\n>  [verse]\n>  'git name-rev' [--tags] [--refs=<pattern>]\n> -\t       ( --all | --stdin | <commit-ish>... )\n> +\t       ( --all | --annotate-stdin | <commit-ish>... )\n>  \n>  DESCRIPTION\n>  -----------\n> @@ -70,10 +70,6 @@ The full name after substitution is master,\n>  while its tree object is 70d105cc79e63b81cfdcb08a15297c23e60b07ad\n>  -----------\n>  \n> ---stdin::\n> -\tThis option is deprecated in favor of 'git name-rev --annotate-stdin'.\n> -\tThey are functionally equivalent.\n> -\n>  --name-only::\n>  \tInstead of printing both the SHA-1 and the name, print only\n>  \tthe name.  If given with --tags the usual tag prefix of\n\nI agree with the main thrust of the change, but I am not sure if it\nis a good idea to \"completely\" remove the mention.\n\nEven after we stop talking about it, people find old scriptlets that\nuse \"name-rev --stdin\" from various random places on the Internet,\nand wonder if they are buggy.  I wonder if having something like\nthis for a year or two may help?  We would need to scan for \"was\ncalled\" and decide to clean them up once in a while, of course.\n\nWill queue as is.  Thanks.\n\n Documentation/git-name-rev.txt | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git c/Documentation/git-name-rev.txt w/Documentation/git-name-rev.txt\nindex 5f196c0370..1173deae57 100644\n--- c/Documentation/git-name-rev.txt\n+++ w/Documentation/git-name-rev.txt\n@@ -46,7 +46,8 @@ OPTIONS\n \tTransform stdin by substituting all the 40-character SHA-1\n \thexes (say $hex) with \"$hex ($rev_name)\".  When used with\n \t--name-only, substitute with \"$rev_name\", omitting $hex\n-\taltogether.\n+\taltogether.  This option was called `--stdin` in older\n+\tversions of Git.\n +\n For example:\n +\n"},{"id":"476655","messageId":"DA805D46-DB2A-4571-A157-5959344C8CA8@gmail.com","threadId":"57522","inReplyTo":"xmqqild6d0y0.fsf@gitster.g","subject":"Re: [PATCH v2] name-rev: make --stdin hidden","fromName":"John Cai","fromEmail":"johncai86@gmail.com","sentAt":"2023-05-05T21:42:58Z","receivedAt":"2023-05-05T21:44:54Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"Hi Junio,\n\nOn 5 May 2023, at 15:37, Junio C Hamano wrote:\n\n> \"John Cai via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n>> From: John Cai <johncai86@gmail.com>\n>>\n>> In 34ae3b70 (name-rev: deprecate --stdin in favor of --annotate-stdin),\n>> we renamed --stdin to --annotate-stdin for the sake of a clearer name\n>> for the option, and added text that indicates --stdin is deprecated. The\n>> next step is to hide --stdin completely.\n>>\n>> Make the option hidden. Also, update documentation to remove all\n>> mentions of --stdin.\n>>\n>> Signed-off-by: \"John Cai\" <johncai86@gmail.com>\n>> ---\n>>     name-rev: make --stdin hidden\n>>\n>>     Now that --stdin has been deprecated for several releases, the next step\n>>     of replacing name-rev --stdin with --annotate-stdin is to make --stdin\n>>     hidden. This patch also updates documentation to get rid of any mention\n>>     of --stdin.\n>\n> Nice.  It has been a year, and I agree that it is about time.\n>\n> Thanks for not forgetting about the topic.\n>\n>>      -+\t\t\t   N_(\"deprecated: use annotate-stdin instead\"),\n>>      ++\t\t\t   N_(\"deprecated: use --annotate-stdin instead\"),\n>\n> And of course this one is a very nice touch, relative to the\n> previous round.\n>\n>>       +\t\t\t   PARSE_OPT_HIDDEN),\n>\n>> diff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt\n>> index ec8a27ce8bf..5f196c03708 100644\n>> --- a/Documentation/git-name-rev.txt\n>> +++ b/Documentation/git-name-rev.txt\n>> @@ -10,7 +10,7 @@ SYNOPSIS\n>>  --------\n>>  [verse]\n>>  'git name-rev' [--tags] [--refs=<pattern>]\n>> -\t       ( --all | --stdin | <commit-ish>... )\n>> +\t       ( --all | --annotate-stdin | <commit-ish>... )\n>>\n>>  DESCRIPTION\n>>  -----------\n>> @@ -70,10 +70,6 @@ The full name after substitution is master,\n>>  while its tree object is 70d105cc79e63b81cfdcb08a15297c23e60b07ad\n>>  -----------\n>>\n>> ---stdin::\n>> -\tThis option is deprecated in favor of 'git name-rev --annotate-stdin'.\n>> -\tThey are functionally equivalent.\n>> -\n>>  --name-only::\n>>  \tInstead of printing both the SHA-1 and the name, print only\n>>  \tthe name.  If given with --tags the usual tag prefix of\n>\n> I agree with the main thrust of the change, but I am not sure if it\n> is a good idea to \"completely\" remove the mention.\n>\n> Even after we stop talking about it, people find old scriptlets that\n> use \"name-rev --stdin\" from various random places on the Internet,\n> and wonder if they are buggy.  I wonder if having something like\n> this for a year or two may help?  We would need to scan for \"was\n> called\" and decide to clean them up once in a while, of course.\n\nYeah, that's valid.\n\n>\n> Will queue as is.  Thanks.\n>\n>  Documentation/git-name-rev.txt | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git c/Documentation/git-name-rev.txt w/Documentation/git-name-rev.txt\n> index 5f196c0370..1173deae57 100644\n> --- c/Documentation/git-name-rev.txt\n> +++ w/Documentation/git-name-rev.txt\n> @@ -46,7 +46,8 @@ OPTIONS\n>  \tTransform stdin by substituting all the 40-character SHA-1\n>  \thexes (say $hex) with \"$hex ($rev_name)\".  When used with\n>  \t--name-only, substitute with \"$rev_name\", omitting $hex\n> -\taltogether.\n> +\taltogether.  This option was called `--stdin` in older\n> +\tversions of Git.\n>  +\n>  For example:\n>  +\n\nSounds good to me. Will add this in\n\nthanks!\nJohn\n"},{"id":"476667","messageId":"pull.1225.v3.git.git.1683346451239.gitgitgadget@gmail.com","threadId":"57522","inReplyTo":"pull.1225.v2.git.git.1683314270964.gitgitgadget@gmail.com","subject":"[PATCH v3] name-rev: make --stdin hidden","fromName":"John Cai via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2023-05-06T04:14:11Z","receivedAt":"2023-05-06T04:14:22Z","isPatch":true,"sender":{"key":"johncai86@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2354211?v=4"},"body":"From: John Cai <johncai86@gmail.com>\n\nIn 34ae3b70 (name-rev: deprecate --stdin in favor of --annotate-stdin),\nwe renamed --stdin to --annotate-stdin for the sake of a clearer name\nfor the option, and added text that indicates --stdin is deprecated. The\nnext step is to hide --stdin completely.\n\nMake the option hidden. Also, update documentation to remove all\nmentions of --stdin.\n\nSigned-off-by: \"John Cai\" <johncai86@gmail.com>\n---\n    name-rev: make --stdin hidden\n    \n    Now that --stdin has been deprecated for several releases, the next step\n    of replacing name-rev --stdin with --annotate-stdin is to make --stdin\n    hidden. This patch also updates documentation to get rid of any mention\n    of --stdin.\n    \n    Changes since v2:\n    \n     * Added a reference to --stdin in the docs\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1225%2Fjohn-cai%2Fjc%2Fhide-name-rev-stdin-v3\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1225/john-cai/jc/hide-name-rev-stdin-v3\nPull-Request: https://github.com/git/git/pull/1225\n\nRange-diff vs v2:\n\n 1:  904cd2c3572 ! 1:  dbba7c4373b name-rev: make --stdin hidden\n     @@ Documentation/git-name-rev.txt: SYNOPSIS\n       \n       DESCRIPTION\n       -----------\n     +@@ Documentation/git-name-rev.txt: OPTIONS\n     + \tTransform stdin by substituting all the 40-character SHA-1\n     + \thexes (say $hex) with \"$hex ($rev_name)\".  When used with\n     + \t--name-only, substitute with \"$rev_name\", omitting $hex\n     +-\taltogether.\n     ++\taltogether. This option was called `--stdin` in older versions\n     ++\tof Git.\n     + +\n     + For example:\n     + +\n      @@ Documentation/git-name-rev.txt: The full name after substitution is master,\n       while its tree object is 70d105cc79e63b81cfdcb08a15297c23e60b07ad\n       -----------\n\n\n Documentation/git-name-rev.txt | 11 ++++-------\n builtin/name-rev.c             |  6 +++++-\n 2 files changed, 9 insertions(+), 8 deletions(-)\n\ndiff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt\nindex ec8a27ce8bf..5c56c870253 100644\n--- a/Documentation/git-name-rev.txt\n+++ b/Documentation/git-name-rev.txt\n@@ -10,7 +10,7 @@ SYNOPSIS\n --------\n [verse]\n 'git name-rev' [--tags] [--refs=<pattern>]\n-\t       ( --all | --stdin | <commit-ish>... )\n+\t       ( --all | --annotate-stdin | <commit-ish>... )\n \n DESCRIPTION\n -----------\n@@ -46,7 +46,8 @@ OPTIONS\n \tTransform stdin by substituting all the 40-character SHA-1\n \thexes (say $hex) with \"$hex ($rev_name)\".  When used with\n \t--name-only, substitute with \"$rev_name\", omitting $hex\n-\taltogether.\n+\taltogether. This option was called `--stdin` in older versions\n+\tof Git.\n +\n For example:\n +\n@@ -70,10 +71,6 @@ The full name after substitution is master,\n while its tree object is 70d105cc79e63b81cfdcb08a15297c23e60b07ad\n -----------\n \n---stdin::\n-\tThis option is deprecated in favor of 'git name-rev --annotate-stdin'.\n-\tThey are functionally equivalent.\n-\n --name-only::\n \tInstead of printing both the SHA-1 and the name, print only\n \tthe name.  If given with --tags the usual tag prefix of\n@@ -107,7 +104,7 @@ Now you are wiser, because you know that it happened 940 revisions before v0.99.\n Another nice thing you can do is:\n \n ------------\n-% git log | git name-rev --stdin\n+% git log | git name-rev --annotate-stdin\n ------------\n \n GIT\ndiff --git a/builtin/name-rev.c b/builtin/name-rev.c\nindex 593f0506a10..4d15a23fc4d 100644\n--- a/builtin/name-rev.c\n+++ b/builtin/name-rev.c\n@@ -573,7 +573,11 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)\n \t\t\t\t   N_(\"ignore refs matching <pattern>\")),\n \t\tOPT_GROUP(\"\"),\n \t\tOPT_BOOL(0, \"all\", &all, N_(\"list all commits reachable from all refs\")),\n-\t\tOPT_BOOL(0, \"stdin\", &transform_stdin, N_(\"deprecated: use --annotate-stdin instead\")),\n+\t\tOPT_BOOL_F(0,\n+\t\t\t   \"stdin\",\n+\t\t\t   &transform_stdin,\n+\t\t\t   N_(\"deprecated: use --annotate-stdin instead\"),\n+\t\t\t   PARSE_OPT_HIDDEN),\n \t\tOPT_BOOL(0, \"annotate-stdin\", &annotate_stdin, N_(\"annotate text from stdin\")),\n \t\tOPT_BOOL(0, \"undefined\", &allow_undefined, N_(\"allow to print `undefined` names (default)\")),\n \t\tOPT_BOOL(0, \"always\",     &always,\n\nbase-commit: 69c786637d7a7fe3b2b8f7d989af095f5f49c3a8\n-- \ngitgitgadget\n"},{"id":"476678","messageId":"20230506123721.67555-1-tenglong.tl@alibaba-inc.com","threadId":"57522","inReplyTo":"pull.1225.v2.git.git.1683314270964.gitgitgadget@gmail.com","subject":"[PATCH v2] name-rev: make --stdin hidden","fromName":"Teng Long","fromEmail":"dyroneteng@gmail.com","sentAt":"2023-05-06T12:37:21Z","receivedAt":"2023-05-06T12:38:40Z","isPatch":true,"sender":{"key":"dyroneteng@gmail.com","avatar":"https://avatars.githubusercontent.com/u/7803958?v=4"},"body":" John Cai <johncai86@gmail.com> writes:\n\n>-\t\tOPT_BOOL(0, \"stdin\", &transform_stdin, N_(\"deprecated: use --annotate-stdin instead\")),\n>+\t\tOPT_BOOL_F(0,\n>+\t\t\t   \"stdin\",\n>+\t\t\t   &transform_stdin,\n>+\t\t\t   N_(\"deprecated: use --annotate-stdin instead\"),\n>+\t\t\t   PARSE_OPT_HIDDEN),\n> \t\tOPT_BOOL(0, \"annotate-stdin\", &annotate_stdin, N_(\"annotate text from stdin\")),\n> \t\tOPT_BOOL(0, \"undefined\", &allow_undefined, N_(\"allow to print `undefined` names (default)\")),\n> \t\tOPT_BOOL(0, \"always\",     &always,\n\nIt seems like there is an odd indent before \"&always\", of course, it's\nnot introduced by this patch.\n\nThanks.\n"}]}