git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] git-contacts: allow inputting patch via stdin

From
Brigham Campbell <me@brighamcampbell.com>
Date
Sep 25, 2026, 01:51 UTC
Message-ID
<DLO0S0UUB0EM.1NLQFJUPOMGY0@brighamcampbell.com>
In-Reply-To
<xmqqtsnf477e.fsf@gitster.g>
On Wed Sep 23, 2026 at 10:13 PM MDT, Junio C Hamano wrote:
Show 7 quoted lines
> 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
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 19 in “git-contacts: allow inputting patch via stdin”
  1. git-contacts: allow inputting patch via stdinBrigham Campbell, Sep 15, 2026
  2. Junio C HamanoSep 15, 2026
  3. git-contacts: allow inputting patch via stdinBrigham Campbell, Sep 16, 2026
  4. Junio C HamanoSep 16, 2026
  5. Brigham CampbellSep 17, 2026
  6. git-contacts: allow inputting patch via stdinBrigham Campbell, Sep 24, 2026
  7. Junio C HamanoSep 24, 2026
  8. Brigham CampbellSep 25, 2026
  9. Junio C HamanoSep 25, 2026
  10. git-contacts: allow inputting patch via stdinBrigham Campbell, Sep 25, 2026
  11. Junio C HamanoSep 25, 2026
  12. 0/2 git-contacts: allow inputting patch via stdinBrigham Campbell, Sep 29, 2026
  13. 1/2 git-contacts: allow inputting patch via stdinBrigham Campbell, Sep 29, 2026
  14. Junio C HamanoSep 29, 2026
  15. Brigham CampbellOct 2, 2026
  16. 2/2 git-contacts: add stdin functionality to docsBrigham Campbell, Sep 29, 2026
  17. Junio C HamanoSep 29, 2026
  18. git-contacts: allow inputting patch via stdinBrigham Campbell, Oct 2, 2026
  19. Junio C HamanoOct 2, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.