From: Kevin Ballard Date: Wed, 25 Jun 2008 22:44:40 +0000 (-0700) Subject: git-send-email: Accept fifos as well as files X-Git-Tag: v1.6.0-rc0~176^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/300913bd448def6fe2f943f534a172259725e7c6?hp=--cc 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 Signed-off-by: Junio C Hamano --- 300913bd448def6fe2f943f534a172259725e7c6 diff --git a/git-send-email.perl b/git-send-email.perl index 0b04ba32f0..16d437526a 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -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 { @@ -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"; + } } }