{"thread":{"id":"14154","subject":"[PATCH] git-send-email: Accept fifos as well as files","startedAt":"2008-06-25T22:44:40Z","lastAt":"2008-06-25T22:44:40Z","messageCount":1,"participants":["Kevin Ballard"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"81199","messageId":"1214433880-19870-1-git-send-email-kevin@sb.org","threadId":"14154","inReplyTo":null,"subject":"[PATCH] git-send-email: Accept fifos as well as files","fromName":"Kevin Ballard","fromEmail":"kevin@sb.org","sentAt":"2008-06-25T22:44:40Z","receivedAt":"2008-06-25T22:44:40Z","isPatch":true,"sender":{"key":"kevin@sb.org","avatar":"https://avatars.githubusercontent.com/u/714?v=4"},"body":"When a fifo is given, validation must be skipped because we can't\nread the fifo twice. Ideally git-send-email would cache the read\ndata instead of attempting to read twice, but for now just skip\nvalidation.\n\nSigned-off-by: Kevin Ballard <kevin@sb.org>\n---\n git-send-email.perl |    8 +++++---\n 1 files changed, 5 insertions(+), 3 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 0b04ba3..16d4375 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -393,7 +393,7 @@ for my $f (@ARGV) {\n \t\tpush @files, grep { -f $_ } map { +$f . \"/\" . $_ }\n \t\t\t\tsort readdir(DH);\n \n-\t} elsif (-f $f) {\n+\t} elsif (-f $f or -p $f) {\n \t\tpush @files, $f;\n \n \t} else {\n@@ -403,8 +403,10 @@ for my $f (@ARGV) {\n \n if (!$no_validate) {\n \tforeach my $f (@files) {\n-\t\tmy $error = validate_patch($f);\n-\t\t$error and die \"fatal: $f: $error\\nwarning: no patches were sent\\n\";\n+\t\tunless (-p $f) {\n+\t\t\tmy $error = validate_patch($f);\n+\t\t\t$error and die \"fatal: $f: $error\\nwarning: no patches were sent\\n\";\n+\t\t}\n \t}\n }\n \n-- \n1.5.6.130.g7a997\n"}]}