aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-11-30 22:38:20 -0800
committerJunio C Hamano <gitster@pobox.com>2008-11-30 22:38:20 -0800
commit69f4ce553708ee5ce474faaa9c45312f38aad563 (patch)
tree54ac3cf08b95469dcbed7dc1fb8a0e7bf6115309 /t
parent7f871c6eccd0b9925310b3f0c60c9ef458e6f109 (diff)
downloadgit-69f4ce553708ee5ce474faaa9c45312f38aad563.tar.gz
git-69f4ce553708ee5ce474faaa9c45312f38aad563.tar.xz
send-email: do not reverse the command line arguments
The loop picks elements from @ARGV one by one, sifts them into arguments meant for format-patch and the script itself, and pushes them to @files and @rev_list_opts arrays. Pick elements from @ARGV starting at the beginning using shift, instead of at the end using pop, as push appends them to the end of the array. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t9001-send-email.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 617e97d96..cb3d18377 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -300,4 +300,17 @@ test_expect_success 'detects ambiguous reference/file conflict' '
grep disambiguate errors
'
+test_expect_success 'feed two files' '
+ rm -fr outdir &&
+ git format-patch -2 -o outdir &&
+ GIT_SEND_EMAIL_NOTTY=1 git send-email \
+ --dry-run \
+ --from="Example <nobody@example.com>" \
+ --to=nobody@example.com \
+ outdir/000?-*.patch 2>errors >out &&
+ grep "^Subject: " out >subjects &&
+ test "z$(sed -n -e 1p subjects)" = "zSubject: [PATCH 1/2] Second." &&
+ test "z$(sed -n -e 2p subjects)" = "zSubject: [PATCH 2/2] add master"
+'
+
test_done