git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-send-email: Accept fifos as well as files
@ 2008-06-25 22:44 Kevin Ballard
  0 siblings, 0 replies; only message in thread
From: Kevin Ballard @ 2008-06-25 22:44 UTC (permalink / raw)
  To: git; +Cc: Kevin Ballard, Junio C Hamano

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>
---
 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 0b04ba3..16d4375 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";
+		}
 	}
 }
 
-- 
1.5.6.130.g7a997

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-25 22:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-25 22:44 [PATCH] git-send-email: Accept fifos as well as files Kevin Ballard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).