diff options
author | Kevin Ballard <kevin@sb.org> | 2008-06-26 00:44:40 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-06-26 07:34:20 +0200 |
commit | 300913bd448def6fe2f943f534a172259725e7c6 (patch) | |
tree | e5d16b111c472238eaf7b339b11ebf6639d39afd | |
parent | verify-pack: test for detection of index v2 object CRC mismatch (diff) | |
download | git-300913bd448def6fe2f943f534a172259725e7c6.tar.xz git-300913bd448def6fe2f943f534a172259725e7c6.zip |
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>
-rwxr-xr-x | git-send-email.perl | 8 |
1 files changed, 5 insertions, 3 deletions
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 @@ for my $f (@ARGV) { 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 @@ for my $f (@ARGV) { 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"; + } } } |