Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Brigham Campbell <me@brighamcampbell.com>
Cc: git@vger.kernel.org,  Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH v4] git-contacts: allow inputting patch via stdin
Date: Fri, 25 Sep 2026 09:09:46 -0700	[thread overview]
Message-ID: <xmqqy0cpwbw5.fsf@gitster.g> (raw)
In-Reply-To: <20260925-git-contacts-stdin-v4-1-9b4e4bcbb91c@brighamcampbell.com> (Brigham Campbell's message of "Fri, 25 Sep 2026 00:42:39 -0600")

Brigham Campbell <me@brighamcampbell.com> writes:

> Make git-contacts accept patch contents via stdin for better
> interoperability with other utilities. Read from stdin when the user
> passes `-` at least once:
>
> $ git contacts - <patch

OK.

> Even before this patch, git-contacts parses files first, then git
> rev-lists second, regardless of their order in argv. If we instead want
> git-contacts to parse arguments in the same order that they're passed,
> that's a change which should occur in a separate patch.

Fair enough.

We would want an update to contrib/contacts/git-contacts.adoc as
well.  Here is my attempt.  I realize that the new text implies that
we read only one patch from the standard input, but I do not know
offhand whether scan_patches() successfully reads multiple patches
concatenated together into a single stream.  If it does, we may want
to say "read patch file(s) from" instead.

The original uses <rev> in <angle brackets> to clarify that it is a
placeholder, so the added text does the same for <patch>.  The
original text does not say what the command expects of the "patch
files" it mentions, which may be worth improving and when it happens
we would say <patch> in the description to refer to one argument on
the command line.  But I left it outside the scope of this message.



 contrib/contacts/git-contacts.adoc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git c/contrib/contacts/git-contacts.adoc w/contrib/contacts/git-contacts.adoc
index dd914d1261..6473e878e0 100644
--- c/contrib/contacts/git-contacts.adoc
+++ w/contrib/contacts/git-contacts.adoc
@@ -24,7 +24,8 @@ Input consists of one or more patch files or revision arguments.  A revision
 argument can be a range or a single `<rev>` which is interpreted as
 `<rev>..HEAD`, thus the same revision arguments are accepted as for
 linkgit:git-format-patch[1]. Patch files and revision arguments can be combined
-in the same invocation.
+in the same invocation.  A single dash `'-'` character in place of a <patch>
+tells the command to read a patch from the standard input.  
 
 This command can be useful for determining the list of people with whom to
 discuss proposed changes, or for finding the list of recipients to Cc: when

  reply	other threads:[~2026-09-25 16:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15  2:43 [PATCH] git-contacts: allow inputting patch via stdin Brigham Campbell
2026-09-15  4:29 ` Junio C Hamano
2026-09-16  4:52 ` [PATCH v2] " Brigham Campbell
2026-09-16 14:25   ` Junio C Hamano
2026-09-17  6:56     ` Brigham Campbell
2026-09-24  1:25 ` [PATCH v3] " Brigham Campbell
2026-09-24  4:13   ` Junio C Hamano
2026-09-25  1:51     ` Brigham Campbell
2026-09-25  4:38       ` Junio C Hamano
2026-09-25  6:42 ` [PATCH v4] " Brigham Campbell
2026-09-25 16:09   ` Junio C Hamano [this message]
2026-09-29  5:47 ` [PATCH v5 0/2] " Brigham Campbell
2026-09-29  5:47   ` [PATCH v5 1/2] " Brigham Campbell
2026-09-29 19:29     ` Junio C Hamano
2026-10-02  4:44       ` Brigham Campbell
2026-09-29  5:47   ` [PATCH v5 2/2] git-contacts: add stdin functionality to docs Brigham Campbell
2026-09-29 16:30   ` [PATCH v5 0/2] git-contacts: allow inputting patch via stdin Junio C Hamano
2026-10-02  6:50 ` [PATCH v6] " Brigham Campbell
2026-10-02 14:50   ` 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=xmqqy0cpwbw5.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=me@brighamcampbell.com \
    --cc=ps@pks.im \
    /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