From: Junio C Hamano <junkio@cox.net>
To: Ryan Anderson <rda@google.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 4/4] Add a basic test case for git send-email, and fix some real bugs discovered.
Date: Mon, 29 May 2006 23:45:29 -0700 [thread overview]
Message-ID: <7v1wuc3t9y.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <7v8xok3vhj.fsf@assigned-by-dhcp.cox.net> (Junio C. Hamano's message of "Mon, 29 May 2006 22:57:44 -0700")
Junio C Hamano <junkio@cox.net> writes:
>> 64ea8c0210c2e9d1711a870460eca326778a4ffc
>> t/t9001-send-email.sh | 34 ++++++++++++++++++++++++++++++++++
>> 1 files changed, 34 insertions(+), 0 deletions(-)
>> create mode 100755 t/t9001-send-email.sh
>
> Adds test, alright, but I do not see the fix. Is this a thinko?
On top of yours, I think this covers the CC: trouble your test
triggers.
-- >8 -
send-email: fix cc address fed to underlying sendmail
---
diff --git a/git-send-email.perl b/git-send-email.perl
index d418d6c..d61ef8e 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -448,9 +448,11 @@ foreach my $t (@files) {
else {
$author_not_sender = $2;
}
- printf("(mbox) Adding cc: %s from line '%s'\n",
- $2, $_) unless $quiet;
- push @cc, $2;
+ my $cc = extract_valid_address($2);
+ printf("(mbox) Adding cc: %s from ".
+ "line '%s'\n",
+ $cc, $_) unless $quiet;
+ push @cc, $cc;
}
} else {
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 276cbac..a61da1e 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -13,10 +13,14 @@ test_expect_success \
test_expect_success \
'Setup helper tool' \
- 'echo "#!/bin/sh" > fake.sendmail
- echo "shift" >> fake.sendmail
- echo "echo \"\$*\" > commandline" >> fake.sendmail
- echo "cat > msgtxt" >> fake.sendmail
+ '(echo "#!/bin/sh"
+ echo shift
+ echo for a
+ echo do
+ echo " echo \"!\$a!\""
+ echo "done >commandline"
+ echo "cat > msgtxt"
+ ) >fake.sendmail
chmod +x ./fake.sendmail
git add fake.sendmail
GIT_AUTHOR_NAME="A" git commit -a -m "Second."'
@@ -26,9 +30,12 @@ test_expect_success \
'git format-patch -n HEAD^1
git send-email -from="Example <nobody@example.com>" --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" ./0001*txt'
+cat >expected <<\EOF
+!nobody@example.com!
+!author@example.com!
+EOF
test_expect_success \
'Verify commandline' \
- 'cline=$(cat commandline)
- [ "$cline" == "nobody@example.com author@example.com" ]'
+ 'diff commandline expected'
test_done
next prev parent reply other threads:[~2006-05-30 6:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <11489310153730-git-send-email-1>
[not found] ` <11489310153598-git-send-email-1>
[not found] ` <11489310151293-git-send-email-1>
[not found] ` <11489310153617-git-send-email-1>
2006-05-30 5:57 ` [PATCH 4/4] Add a basic test case for git send-email, and fix some real bugs discovered Junio C Hamano
2006-05-30 6:45 ` Junio C Hamano [this message]
2006-05-30 6:58 ` Junio C Hamano
2006-05-30 13:23 ` Alex Riesen
2006-05-30 15:21 ` Christopher Faylor
2006-05-30 16:00 ` Alex Riesen
2006-05-30 17:03 ` Christopher Faylor
2006-05-30 17:08 ` Ryan Anderson
2006-05-30 17:32 ` Alex Riesen
2006-05-30 8:51 ` Ryan Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v1wuc3t9y.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=rda@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox