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>maint
parent
85fe23ed2a
commit
300913bd44
|
@ -393,7 +393,7 @@ for my $f (@ARGV) {
|
||||||
push @files, grep { -f $_ } map { +$f . "/" . $_ }
|
push @files, grep { -f $_ } map { +$f . "/" . $_ }
|
||||||
sort readdir(DH);
|
sort readdir(DH);
|
||||||
|
|
||||||
} elsif (-f $f) {
|
} elsif (-f $f or -p $f) {
|
||||||
push @files, $f;
|
push @files, $f;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -403,8 +403,10 @@ for my $f (@ARGV) {
|
||||||
|
|
||||||
if (!$no_validate) {
|
if (!$no_validate) {
|
||||||
foreach my $f (@files) {
|
foreach my $f (@files) {
|
||||||
my $error = validate_patch($f);
|
unless (-p $f) {
|
||||||
$error and die "fatal: $f: $error\nwarning: no patches were sent\n";
|
my $error = validate_patch($f);
|
||||||
|
$error and die "fatal: $f: $error\nwarning: no patches were sent\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue