From: Junio C Hamano Date: Thu, 24 Sep 2026 04:13:57 GMT Subject: Re: [PATCH v3] git-contacts: allow inputting patch via stdin Message-ID: In-Reply-To: <20260923-git-contacts-stdin-v3-1-56dd43c64d56@brighamcampbell.com> Brigham Campbell writes: > $ git contacts - $ git contacts patch1 - patch3 -my (@files, @rev_args); > +my (@files, @rev_args, $read_from_stdin); > for (@ARGV) { > - if (-e) { > + if ($_ eq '-') { > + $read_from_stdin = 1; > + } elsif (-e) { > push @files, $_; > } else { > push @rev_args, $_; But this does not match what I would expect here, which would be to have something like this ... if (-e || $_ eq '-') { push @files, $_; } else { push @rev_args, $_; } ... around here, and then tell scan_patch_file that "-" shouldn't be opened and instead read from the standard input stream, perhaps like sub scan_patch_file { my ($commits, $file) = @_; if ($file eq '-') { $f = \*STDIN; } else { open my $f, '<', $file or die "read failure: $file: $!\n"; } scan_patches($commits, undef, $f); close $f; } or something.