-
Notifications
You must be signed in to change notification settings - Fork 26.6k
name-rev: make --stdin hidden #1225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
/preview |
Preview email sent as pull.1225.git.git.1646774004223.gitgitgadget@gmail.com |
/submit |
Submitted as pull.1225.git.git.1646774677277.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
On the Git mailing list, Junio C Hamano wrote (reply to this):
|
On the Git mailing list, John Cai wrote (reply to this):
|
32c8db2
to
904cd2c
Compare
/preview |
Preview email sent as pull.1225.v2.git.git.1683314071452.gitgitgadget@gmail.com |
/submit |
Submitted as pull.1225.v2.git.git.1683314270964.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
On the Git mailing list, Eric Sunshine wrote (reply to this): On Fri, May 5, 2023 at 3:19 PM John Cai via GitGitGadget
<gitgitgadget@gmail.com> wrote:
> In 34ae3b70 (name-rev: deprecate --stdin in favor of --annotate-stdin),
> we renamed --stdin to --annotate-stdin for the sake of a clearer name
> for the option, and added text that indicates --stdin is deprecated. The
> next step is to hide --stdin completely.
>
> Make the option hidden. Also, update documentation to remove all
> mentions of --stdin.
Eradicating all mention of --stdin from the documentation makes it
more hostile for end-users, doesn't it? If someone runs across --stdin
in a blog post or in some in-the-wild script, then this makes it more
difficult to learn what the option does. In other such cases, rather
than purging all mention from documentation, we've instead mentioned
the deprecated option only as a minor aside of the option which
replaces it. For instance:
--annotate-stdin::
Transform stdin by ... omitting $hex altogether.
`--stdin` is a deprecated synonym.
> Signed-off-by: "John Cai" <johncai86@gmail.com> |
User |
On the Git mailing list, Junio C Hamano wrote (reply to this): "John Cai via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: John Cai <johncai86@gmail.com>
>
> In 34ae3b70 (name-rev: deprecate --stdin in favor of --annotate-stdin),
> we renamed --stdin to --annotate-stdin for the sake of a clearer name
> for the option, and added text that indicates --stdin is deprecated. The
> next step is to hide --stdin completely.
>
> Make the option hidden. Also, update documentation to remove all
> mentions of --stdin.
>
> Signed-off-by: "John Cai" <johncai86@gmail.com>
> ---
> name-rev: make --stdin hidden
>
> Now that --stdin has been deprecated for several releases, the next step
> of replacing name-rev --stdin with --annotate-stdin is to make --stdin
> hidden. This patch also updates documentation to get rid of any mention
> of --stdin.
Nice. It has been a year, and I agree that it is about time.
Thanks for not forgetting about the topic.
> -+ N_("deprecated: use annotate-stdin instead"),
> ++ N_("deprecated: use --annotate-stdin instead"),
And of course this one is a very nice touch, relative to the
previous round.
> + PARSE_OPT_HIDDEN),
> diff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt
> index ec8a27ce8bf..5f196c03708 100644
> --- a/Documentation/git-name-rev.txt
> +++ b/Documentation/git-name-rev.txt
> @@ -10,7 +10,7 @@ SYNOPSIS
> --------
> [verse]
> 'git name-rev' [--tags] [--refs=<pattern>]
> - ( --all | --stdin | <commit-ish>... )
> + ( --all | --annotate-stdin | <commit-ish>... )
>
> DESCRIPTION
> -----------
> @@ -70,10 +70,6 @@ The full name after substitution is master,
> while its tree object is 70d105cc79e63b81cfdcb08a15297c23e60b07ad
> -----------
>
> ---stdin::
> - This option is deprecated in favor of 'git name-rev --annotate-stdin'.
> - They are functionally equivalent.
> -
> --name-only::
> Instead of printing both the SHA-1 and the name, print only
> the name. If given with --tags the usual tag prefix of
I agree with the main thrust of the change, but I am not sure if it
is a good idea to "completely" remove the mention.
Even after we stop talking about it, people find old scriptlets that
use "name-rev --stdin" from various random places on the Internet,
and wonder if they are buggy. I wonder if having something like
this for a year or two may help? We would need to scan for "was
called" and decide to clean them up once in a while, of course.
Will queue as is. Thanks.
Documentation/git-name-rev.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git c/Documentation/git-name-rev.txt w/Documentation/git-name-rev.txt
index 5f196c0370..1173deae57 100644
--- c/Documentation/git-name-rev.txt
+++ w/Documentation/git-name-rev.txt
@@ -46,7 +46,8 @@ OPTIONS
Transform stdin by substituting all the 40-character SHA-1
hexes (say $hex) with "$hex ($rev_name)". When used with
--name-only, substitute with "$rev_name", omitting $hex
- altogether.
+ altogether. This option was called `--stdin` in older
+ versions of Git.
+
For example:
+ |
In 34ae3b7 (name-rev: deprecate --stdin in favor of --annotate-stdin), we renamed --stdin to --annotate-stdin for the sake of a clearer name for the option, and added text that indicates --stdin is deprecated. The next step is to hide --stdin completely. Make the option hidden. Also, update documentation to remove all mentions of --stdin. Signed-off-by: "John Cai" <johncai86@gmail.com>
904cd2c
to
dbba7c4
Compare
On the Git mailing list, John Cai wrote (reply to this): Hi Junio,
On 5 May 2023, at 15:37, Junio C Hamano wrote:
> "John Cai via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
>> From: John Cai <johncai86@gmail.com>
>>
>> In 34ae3b70 (name-rev: deprecate --stdin in favor of --annotate-stdin),
>> we renamed --stdin to --annotate-stdin for the sake of a clearer name
>> for the option, and added text that indicates --stdin is deprecated. The
>> next step is to hide --stdin completely.
>>
>> Make the option hidden. Also, update documentation to remove all
>> mentions of --stdin.
>>
>> Signed-off-by: "John Cai" <johncai86@gmail.com>
>> ---
>> name-rev: make --stdin hidden
>>
>> Now that --stdin has been deprecated for several releases, the next step
>> of replacing name-rev --stdin with --annotate-stdin is to make --stdin
>> hidden. This patch also updates documentation to get rid of any mention
>> of --stdin.
>
> Nice. It has been a year, and I agree that it is about time.
>
> Thanks for not forgetting about the topic.
>
>> -+ N_("deprecated: use annotate-stdin instead"),
>> ++ N_("deprecated: use --annotate-stdin instead"),
>
> And of course this one is a very nice touch, relative to the
> previous round.
>
>> + PARSE_OPT_HIDDEN),
>
>> diff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt
>> index ec8a27ce8bf..5f196c03708 100644
>> --- a/Documentation/git-name-rev.txt
>> +++ b/Documentation/git-name-rev.txt
>> @@ -10,7 +10,7 @@ SYNOPSIS
>> --------
>> [verse]
>> 'git name-rev' [--tags] [--refs=<pattern>]
>> - ( --all | --stdin | <commit-ish>... )
>> + ( --all | --annotate-stdin | <commit-ish>... )
>>
>> DESCRIPTION
>> -----------
>> @@ -70,10 +70,6 @@ The full name after substitution is master,
>> while its tree object is 70d105cc79e63b81cfdcb08a15297c23e60b07ad
>> -----------
>>
>> ---stdin::
>> - This option is deprecated in favor of 'git name-rev --annotate-stdin'.
>> - They are functionally equivalent.
>> -
>> --name-only::
>> Instead of printing both the SHA-1 and the name, print only
>> the name. If given with --tags the usual tag prefix of
>
> I agree with the main thrust of the change, but I am not sure if it
> is a good idea to "completely" remove the mention.
>
> Even after we stop talking about it, people find old scriptlets that
> use "name-rev --stdin" from various random places on the Internet,
> and wonder if they are buggy. I wonder if having something like
> this for a year or two may help? We would need to scan for "was
> called" and decide to clean them up once in a while, of course.
Yeah, that's valid.
>
> Will queue as is. Thanks.
>
> Documentation/git-name-rev.txt | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git c/Documentation/git-name-rev.txt w/Documentation/git-name-rev.txt
> index 5f196c0370..1173deae57 100644
> --- c/Documentation/git-name-rev.txt
> +++ w/Documentation/git-name-rev.txt
> @@ -46,7 +46,8 @@ OPTIONS
> Transform stdin by substituting all the 40-character SHA-1
> hexes (say $hex) with "$hex ($rev_name)". When used with
> --name-only, substitute with "$rev_name", omitting $hex
> - altogether.
> + altogether. This option was called `--stdin` in older
> + versions of Git.
> +
> For example:
> +
Sounds good to me. Will add this in
thanks!
John |
This branch is now known as |
This patch series was integrated into seen via 46165be. |
There was a status update in the "New Topics" section about the branch The "--stdin" option of "git name-rev" has been replaced with the "--annotate-stdin" option more than a year ago. We stop advertising it in the "git name-rev -h" output. Expecting a reroll. source: <pull.1225.v2.git.git.1683314270964.gitgitgadget@gmail.com> |
/submit |
Submitted as pull.1225.v3.git.git.1683346451239.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
On the Git mailing list, Teng Long wrote (reply to this): John Cai <johncai86@gmail.com> writes:
>- OPT_BOOL(0, "stdin", &transform_stdin, N_("deprecated: use --annotate-stdin instead")),
>+ OPT_BOOL_F(0,
>+ "stdin",
>+ &transform_stdin,
>+ N_("deprecated: use --annotate-stdin instead"),
>+ PARSE_OPT_HIDDEN),
> OPT_BOOL(0, "annotate-stdin", &annotate_stdin, N_("annotate text from stdin")),
> OPT_BOOL(0, "undefined", &allow_undefined, N_("allow to print `undefined` names (default)")),
> OPT_BOOL(0, "always", &always,
It seems like there is an odd indent before "&always", of course, it's
not introduced by this patch.
Thanks. |
User |
This patch series was integrated into seen via 1a08a03. |
This patch series was integrated into seen via 22bdc68. |
This patch series was integrated into seen via 3e1b528. |
This patch series was integrated into seen via 9bdc155. |
This patch series was integrated into seen via bf5624b. |
This patch series was integrated into seen via f3daf77. |
This patch series was integrated into seen via abb2dcf. |
This patch series was integrated into next via 0db4f08. |
There was a status update in the "Cooking" section about the branch The "--stdin" option of "git name-rev" has been replaced with the "--annotate-stdin" option more than a year ago. We stop advertising it in the "git name-rev -h" output. Will merge to 'master'. source: <pull.1225.v3.git.git.1683346451239.gitgitgadget@gmail.com> |
This patch series was integrated into seen via ec7ed2c. |
This patch series was integrated into seen via 474cb95. |
There was a status update in the "Cooking" section about the branch The "--stdin" option of "git name-rev" has been replaced with the "--annotate-stdin" option more than a year ago. We stop advertising it in the "git name-rev -h" output. Will merge to 'master'. source: <pull.1225.v3.git.git.1683346451239.gitgitgadget@gmail.com> |
This patch series was integrated into seen via a9b1b92. |
This patch series was integrated into seen via be2fd0e. |
This patch series was integrated into next via be2fd0e. |
This patch series was integrated into master via be2fd0e. |
Closed via be2fd0e. |
Now that --stdin has been deprecated for several releases, the next step of replacing name-rev --stdin with --annotate-stdin is to make --stdin hidden. This patch also updates documentation to get rid of any mention of --stdin.
Changes since v2:
cc: Eric Sunshine sunshine@sunshineco.com
cc: Teng Long dyroneteng@gmail.com