summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fe0f944)
raw | patch | inline | side by side (parent: fe0f944)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Thu, 30 Sep 2010 13:42:56 +0000 (13:42 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 30 Sep 2010 19:20:32 +0000 (12:20 -0700) |
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Reviewed-by: Jeff King <peff@peff.net>
>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl | patch | blob | history |
diff --git a/git-send-email.perl b/git-send-email.perl
index 634835c8377fb6524377ca5ae9bc479484296ce6..488d8947da57b1ba161ebd877a609754e47d2c07 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
$message_num = 0;
foreach my $t (@files) {
- open(F,"<",$t) or die "can't open file $t";
+ open my $fh, "<", $t or die "can't open file $t";
my $author = undef;
my $author_encoding;
$message = "";
$message_num++;
# First unfold multiline header fields
- while(<F>) {
+ while(<$fh>) {
last if /^\s*$/;
if (/^\s+\S/ and @header) {
chomp($header[$#header]);
}
}
# Now parse the message body
- while(<F>) {
+ while(<$fh>) {
$message .= $_;
if (/^(Signed-off-by|Cc): (.*)$/i) {
chomp;
$c, $_) unless $quiet;
}
}
- close F;
+ close $fh;
if (defined $cc_cmd && !$suppress_cc{'cccmd'}) {
- open(F, "$cc_cmd \Q$t\E |")
+ open my $fh, "$cc_cmd \Q$t\E |"
or die "(cc-cmd) Could not execute '$cc_cmd'";
- while(<F>) {
+ while(<$fh>) {
my $c = $_;
$c =~ s/^\s*//g;
$c =~ s/\n$//g;
printf("(cc-cmd) Adding cc: %s from: '%s'\n",
$c, $cc_cmd) unless $quiet;
}
- close F
+ close $fh
or die "(cc-cmd) failed to close pipe to '$cc_cmd'";
}