diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2010-09-30 13:43:09 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-09-30 12:20:33 -0700 |
commit | 41ae8f1d6cf70f32328c984cdbe51d0f156cd501 (patch) | |
tree | f97db962830780cbd84bab82d54144d5dc7e5c64 /t | |
parent | 529dd386dda6c6e6d0dad801785d2d943756fb3f (diff) | |
download | git-41ae8f1d6cf70f32328c984cdbe51d0f156cd501.tar.gz |
send-email: use Perl idioms in while loop
Change `while(<$fh>) { my $c = $_' to `while(my $c = <$fh>) {', and
use `chomp $c' instead of `$c =~ s/\n$//g;', the two are equivalent in
this case.
I've also changed the --cccmd test so that we test for the stripping
of whitespace at the beginning of the lines returned from the
--cccmd. I think we probably shouldn't do this, but it was there
already so I haven't changed the behavior.
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>
Diffstat (limited to 't')
-rwxr-xr-x | t/t9001-send-email.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 6f67da4e71..99a16d5750 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@ -204,7 +204,7 @@ test_expect_success $PREREQ 'Prompting works' ' test_expect_success $PREREQ 'cccmd works' ' clean_fake_sendmail && cp $patches cccmd.patch && - echo cccmd--cccmd@example.com >>cccmd.patch && + echo "cccmd-- cccmd@example.com" >>cccmd.patch && { echo "#!$SHELL_PATH" echo sed -n -e s/^cccmd--//p \"\$1\" |