Skip to content

Commit

Permalink
git-send-email: Accept fifos as well as files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kevin Ballard authored and Junio C Hamano committed Jun 26, 2008
1 parent 85fe23e commit 300913b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ sub read_config {
push @files, grep { -f $_ } map { +$f . "/" . $_ }
sort readdir(DH);

} elsif (-f $f) {
} elsif (-f $f or -p $f) {
push @files, $f;

} else {
Expand All @@ -403,8 +403,10 @@ sub read_config {

if (!$no_validate) {
foreach my $f (@files) {
my $error = validate_patch($f);
$error and die "fatal: $f: $error\nwarning: no patches were sent\n";
unless (-p $f) {
my $error = validate_patch($f);
$error and die "fatal: $f: $error\nwarning: no patches were sent\n";
}
}
}

Expand Down

0 comments on commit 300913b

Please sign in to comment.