git-send-email: Accept fifos as well as files
When a fifo is given, validation must be skipped because we can't read the fifo twice. Ideally git-send-email would cache the read data instead of attempting to read twice, but for now just skip validation. Signed-off-by: Kevin Ballard <kevin@sb.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Kevin Ballard committed
Jun 25, 2008 at 15:44 UTC
300913bd448def6fe2f943f534a172259725e7c6
1 file changed
+5
-3
git-send-email.perl
+5
-3
@@ -393,7 +393,7 @@ for my $f (@ARGV) {
393
push @files, grep { -f $_ } map { +$f . "/" . $_ }
394
sort readdir(DH);
395
396
- } elsif (-f $f) {
396
+ } elsif (-f $f or -p $f) {
397
push @files, $f;
398
399
} else {
@@ -403,8 +403,10 @@ for my $f (@ARGV) {
403
404
if (!$no_validate) {
405
foreach my $f (@files) {
406
- my $error = validate_patch($f);
407
- $error and die "fatal: $f: $error\nwarning: no patches were sent\n";
406
+ unless (-p $f) {
407
+ my $error = validate_patch($f);
408
+ $error and die "fatal: $f: $error\nwarning: no patches were sent\n";
409
+ }
410
}
411
}
412