From: "Brigham Campbell" <me@brighamcampbell.com>
To: "Junio C Hamano" <gitster@pobox.com>,
"Brigham Campbell" <me@brighamcampbell.com>
Cc: <git@vger.kernel.org>, "Patrick Steinhardt" <ps@pks.im>
Subject: Re: [PATCH v3] git-contacts: allow inputting patch via stdin
Date: Thu, 24 Sep 2026 19:51:52 -0600 [thread overview]
Message-ID: <DLO0S0UUB0EM.1NLQFJUPOMGY0@brighamcampbell.com> (raw)
In-Reply-To: <xmqqtsnf477e.fsf@gitster.g>
On Wed Sep 23, 2026 at 10:13 PM MDT, Junio C Hamano wrote:
> Brigham Campbell <me@brighamcampbell.com> writes:
>
>> $ git contacts - <patch
>> $ git contacts patch1 - patch3 <patch2
>
> The second one is an example that we could tell the command to read
> these three files in patch1 and then patch2 and then patch3.
Does the order in which arguments are processed matter? If it's a matter
of producing predictable output, I just checked out `master` and I see
that running git-contacts twice produces the same email addresses, but
in different orders for the same two input patches:
$ git format-patch HEAD~2
0001-Git-2.56-rc2.patch
0002-Revert-Merge-branch-en-no-amend-during-conflicts.patch
$ ./contrib/contacts/git-contacts *.patch
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Elijah Newren <newren@gmail.com>
Junio C Hamano <gitster@pobox.com>
$ ./contrib/contacts/git-contacts *.patch
Elijah Newren <newren@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Junio C Hamano <gitster@pobox.com>
What's more, git-contacts already disregards the order of argv. It will
always scan file contents first and then git rev-lists second, even if
the user passes the rev-list first like follows:
git contacts HEAD~2.. foo.patch
I would argue that this is not by mistake. The user should have no
expectation as to the order in which arguments are processed. If the
commit message implies that the arguments are processed one after
another, regardless of whether it's a file, a rev-list, or stdin, then
the commit message should be changed.
Do I misunderstand?
--
Brigham Campbell
https://brighamcampbell.com
next prev parent reply other threads:[~2026-09-25 1:51 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 [this message]
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
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=DLO0S0UUB0EM.1NLQFJUPOMGY0@brighamcampbell.com \
--to=me@brighamcampbell.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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