1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-28 12:59:41 +01:00

Merge branch 'mh/maint-fix-send-email-threaded' into mh/fix-send-email-threaded

* mh/maint-fix-send-email-threaded:
  doc/send-email: clarify the behavior of --in-reply-to with --no-thread
  send-email: fix non-threaded mails
  add a test for git-send-email for non-threaded mails

Conflicts:
	git-send-email.perl
	t/t9001-send-email.sh
This commit is contained in:
Junio C Hamano 2009-06-12 09:23:43 -07:00
commit 95a877a34c
3 changed files with 14 additions and 3 deletions

View file

@ -165,7 +165,7 @@ Automating
Output of this command must be single email address per line.
Default is the value of 'sendemail.cccmd' configuration value.
--[no-]chain-reply-to=<identifier>::
--[no-]chain-reply-to::
If this is set, each email will be sent as a reply to the previous
email sent. If disabled with "--no-chain-reply-to", all emails after
the first will be sent as replies to the first email sent. When using
@ -214,7 +214,8 @@ specified, as well as 'body' if --no-signed-off-cc is specified.
--[no-]thread::
If this is set, the In-Reply-To header will be set on each email sent.
If disabled with "--no-thread", no emails will have the In-Reply-To
header set. Default is the value of the 'sendemail.thread' configuration
header set, unless specified with --in-reply-to.
Default is the value of the 'sendemail.thread' configuration
value; if that is unspecified, default to --thread.

View file

@ -1150,7 +1150,7 @@ sub send_message
my $message_was_sent = send_message();
# set up for the next message
if ($message_was_sent &&
if ($thread && $message_was_sent &&
($chain_reply_to || !defined $reply_to || length($reply_to) == 0)) {
$reply_to = $message_id;
if (length $references > 0) {

View file

@ -621,6 +621,16 @@ test_expect_success 'in-reply-to but no threading' '
grep "In-Reply-To: <in-reply-id@example.com>"
'
test_expect_success 'no in-reply-to and no threading' '
git send-email \
--dry-run \
--from="Example <nobody@example.com>" \
--to=nobody@example.com \
--nothread \
$patches $patches >stdout &&
! grep "In-Reply-To: " stdout
'
test_expect_success 'threading but no chain-reply-to' '
git send-email \
--dry-run \