Re: [PATCH v2] git-contacts: allow inputting patch via stdin
- From
Brigham Campbell <me@brighamcampbell.com>
- Date
- Sep 17, 2026, 06:56 UTC
- Message-ID
- <DLHE97Z5RDVA.168ZY5Q3TG8YJ@brighamcampbell.com>
- In-Reply-To
- <xmqqa4phxogc.fsf@gitster.g>
On Wed Sep 16, 2026 at 8:25 AM MDT, Junio C Hamano wrote:
Show 11 quoted lines
> Not necessarily a suggestion to change what you already added, but a > mere food for thought. > > An obvious (and UNIX-y) alternative design would have been to follow > the popular convention to tell the command to read from the standard > input stream when "-" is used instead of a filename. Then this line > did not have to change, and the command would have allowed arguments > like: > > $ git contacts patch1 patch2 - <patch3 > $ git contacts patch1 - patch3 <patch2
I considered this approach as well. I may as well have flipped a coin. My approach to choosing hyphen or no wasn't very scientific.
Naturally, if you'd prefer that I change the approach to instead allow the user to pass "-" to indicate that a patch should be read via stdin, I'm happy to send out another revision. I understand why we would rather get the interface right on the first try, even for something small like this.
Until you ask me to work a revision that uses "-", I'll await further review on this v2.
Thanks again for your time!
-- Brigham Campbell https://brighamcampbell.com