From: Junio C Hamano <gitster@pobox.com>
To: kristofferhaugsbakk@fastmail.com
Cc: git@vger.kernel.org, Kristoffer Haugsbakk <code@khaugsbakk.name>,
Jeff King <peff@peff.net>, Teng Long <dyroneteng@gmail.com>
Subject: Re: [PATCH 6/6] doc: notes: treat --stdin equally between copy/remove
Date: Tue, 20 May 2025 12:19:07 -0700 [thread overview]
Message-ID: <xmqq34czhyz8.fsf@gitster.g> (raw)
In-Reply-To: <68e5eb78040419ba64e256910501c7e37194b222.1747763769.git.code@khaugsbakk.name> (kristofferhaugsbakk@fastmail.com's message of "Tue, 20 May 2025 19:57:24 +0200")
kristofferhaugsbakk@fastmail.com writes:
> From: Kristoffer Haugsbakk <code@khaugsbakk.name>
>
> 46538012d94 (notes remove: --stdin reads from the standard input,
> 2011-05-18) added `--stdin` for the `remove` subcommand, documenting it
> in the “Options” section. But `copy --stdin` was added before that, in
> 160baa0d9cb (notes: implement 'git notes copy --stdin', 2010-03-12).
>
> Treat this option equally between the two subcommands:
>
> • remove: mention `--stdin` on the subcommand as well, like for `copy`
> • copy: mention it as well under the option documentation
>
> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
> ---
> Documentation/git-notes.adoc | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/git-notes.adoc b/Documentation/git-notes.adoc
> index d2d7dac8d41..1542850eaaa 100644
> --- a/Documentation/git-notes.adoc
> +++ b/Documentation/git-notes.adoc
> @@ -127,6 +127,10 @@ When done, the user can either finalize the merge with
> giving zero or one object from the command line, this is
> equivalent to specifying an empty note message to
> the `edit` subcommand.
> ++
> +In `--stdin` mode, also remove the object names given on standard
> +input. In other words, `--stdin` can be combined with object names from
> +the command line.
>
> `prune`::
> Remove all notes for non-existing/unreachable objects.
> @@ -208,9 +212,9 @@ See `core.commentChar` in linkgit:git-config[1].
> object that does not have notes attached to it.
>
> `--stdin`::
> - Also read the object names to remove notes from the standard
> - input (there is no reason you cannot combine this with object
> - names from the command line).
The original was really bad, especially if it ignored the fact that
the 'copy' action also took the option.
> + For `remove` and `copy`. See the respective subcommands. This
> + option can be combined with object names given via the command
> + line for `remove`. However, this is not the case for `copy`.
During my first read of this paragraph, I somehow read the first two
sentences as "if you want to learn how this option behaves with the
remove and copy subcommands, go read the documentation for these
subcommands", making me anticipate that the remainder of the
paragraph would talks about what happens when --stdin is given to
other subcommands. Apparently that is not what is going on.
It may be simpler to just say
Only valid for `remove` and `copy`. See the respective
subcommands.
and stop there.
next prev parent reply other threads:[~2025-05-20 19:19 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 17:57 [PATCH 0/6] doc: --stdin on notes and core.commentChar mentions kristofferhaugsbakk
2025-05-20 17:57 ` [PATCH 1/6] doc: stripspace: mention where the default comes from kristofferhaugsbakk
2025-05-20 19:06 ` Junio C Hamano
2025-05-21 15:04 ` Kristoffer Haugsbakk
2025-05-20 17:57 ` [PATCH 2/6] doc: config: mention core.commentChar on commit.cleanup kristofferhaugsbakk
2025-05-20 17:57 ` [PATCH 3/6] doc: notes: split out options with negations kristofferhaugsbakk
2025-05-20 19:11 ` Junio C Hamano
2025-05-21 13:14 ` Junio C Hamano
2025-05-21 14:42 ` Kristoffer Haugsbakk
2025-05-21 15:47 ` Junio C Hamano
2025-05-21 15:52 ` Kristoffer Haugsbakk
2025-05-20 17:57 ` [PATCH 4/6] doc: notes: mention comment character configuration kristofferhaugsbakk
2025-05-20 19:14 ` Junio C Hamano
2025-05-20 17:57 ` [PATCH 5/6] doc: notes: point out copy --stdin use with argv kristofferhaugsbakk
2025-05-20 19:15 ` Junio C Hamano
2025-05-20 17:57 ` [PATCH 6/6] doc: notes: treat --stdin equally between copy/remove kristofferhaugsbakk
2025-05-20 19:19 ` Junio C Hamano [this message]
2025-05-21 14:49 ` Kristoffer Haugsbakk
2025-05-21 13:19 ` D. Ben Knoble
2025-05-21 14:44 ` Kristoffer Haugsbakk
2025-05-21 15:50 ` Junio C Hamano
2025-05-23 19:29 ` [PATCH v2 0/9] doc: --stdin on notes and core.commentChar mentions kristofferhaugsbakk
2025-05-23 19:29 ` [PATCH v2 1/9] doc: stripspace: mention where the default comes from kristofferhaugsbakk
2025-05-23 19:29 ` [PATCH v2 2/9] doc: config: mention core.commentChar on commit.cleanup kristofferhaugsbakk
2025-05-23 19:29 ` [PATCH v2 3/9] doc: notes: split out options with negated forms kristofferhaugsbakk
2025-05-23 19:29 ` [PATCH v2 4/9] doc: notes: rework --[no-]stripspace kristofferhaugsbakk
2025-05-23 19:29 ` [PATCH v2 5/9] doc: notes: remove stripspace discussion from other options kristofferhaugsbakk
2025-05-23 19:29 ` [PATCH v2 6/9] doc: notes: clearly state that --stripspace is the default kristofferhaugsbakk
2025-05-23 21:36 ` Junio C Hamano
2025-05-23 19:29 ` [PATCH v2 7/9] doc: notes: point out copy --stdin use with argv kristofferhaugsbakk
2025-05-23 19:29 ` [PATCH v2 8/9] doc: notes: treat --stdin equally between copy/remove kristofferhaugsbakk
2025-05-23 21:40 ` Junio C Hamano
2025-05-23 19:29 ` [PATCH v2 9/9] doc: notes: use stuck form throughout kristofferhaugsbakk
2025-05-27 21:19 ` [PATCH v3 0/9] doc: --stdin on notes and core.commentChar mentions kristofferhaugsbakk
2025-05-27 21:19 ` [PATCH v3 1/9] doc: stripspace: mention where the default comes from kristofferhaugsbakk
2025-05-27 21:19 ` [PATCH v3 2/9] doc: config: mention core.commentChar on commit.cleanup kristofferhaugsbakk
2025-05-27 21:19 ` [PATCH v3 3/9] doc: notes: split out options with negated forms kristofferhaugsbakk
2025-05-27 21:19 ` [PATCH v3 4/9] doc: notes: rework --[no-]stripspace kristofferhaugsbakk
2025-05-27 21:19 ` [PATCH v3 5/9] doc: notes: remove stripspace discussion from other options kristofferhaugsbakk
2025-05-27 21:19 ` [PATCH v3 6/9] doc: notes: clearly state that --stripspace is the default kristofferhaugsbakk
2025-05-27 21:19 ` [PATCH v3 7/9] doc: notes: point out copy --stdin use with argv kristofferhaugsbakk
2025-05-27 21:19 ` [PATCH v3 8/9] doc: notes: treat --stdin equally between copy/remove kristofferhaugsbakk
2025-05-27 21:19 ` [PATCH v3 9/9] doc: notes: use stuck form throughout kristofferhaugsbakk
2025-05-27 22:33 ` [PATCH v3 0/9] doc: --stdin on notes and core.commentChar mentions Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq34czhyz8.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=code@khaugsbakk.name \
--cc=dyroneteng@gmail.com \
--cc=git@vger.kernel.org \
--cc=kristofferhaugsbakk@fastmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).