summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 384f122)
raw | patch | inline | side by side (parent: 384f122)
author | Adam Roben <aroben@apple.com> | |
Tue, 26 Jun 2007 22:48:30 +0000 (15:48 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 27 Jun 2007 05:22:06 +0000 (22:22 -0700) |
The --threaded option controls whether the In-Reply-To header will be set on
any emails sent. The current behavior is to always set this header, so this
option is most useful in its negated form, --no-threaded. This behavior can
also be controlled through the 'sendemail.threaded' config setting.
Signed-off-by: Adam Roben <aroben@apple.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
any emails sent. The current behavior is to always set this header, so this
option is most useful in its negated form, --no-threaded. This behavior can
also be controlled through the 'sendemail.threaded' config setting.
Signed-off-by: Adam Roben <aroben@apple.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-send-email.txt | patch | blob | history | |
git-send-email.perl | patch | blob | history |
index 946bd76afc5bf9de22917bb4f4c1d8b44c745503..1f5d57d42fa56b3bc2115006a760df6420a462b2 100644 (file)
Do not add the From: address to the cc: list, if it shows up in a From:
line.
+--threaded, --no-threaded::
+ If this is set, the In-Reply-To header will be set on each email sent.
+ If disabled with "--no-threaded", no emails will have the In-Reply-To
+ header set.
+ Default is the value of the 'sendemail.threaded' configuration value;
+ if that is unspecified, default to --threaded.
+
--dry-run::
Do everything except actually send the emails.
diff --git a/git-send-email.perl b/git-send-email.perl
index 9f75551673acc7a53adb789b16e1d04f273fdf89..b8b8fe7ee35aaf7a0bb84ab59b619dc554ae4dc1 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
--suppress-from Suppress sending emails to yourself if your address
appears in a From: line.
+ --threaded Specify that the "In-Reply-To:" header should be set on all
+ emails. Defaults to on.
+
--quiet Make git-send-email less verbose. One line per email
should be all that is output.
$initial_reply_to,$initial_subject,@files,$from,$compose,$time);
# Behavior modification variables
-my ($chain_reply_to, $quiet, $suppress_from, $no_signed_off_cc,
- $dry_run) = (1, 0, 0, 0, 0);
+my ($threaded, $chain_reply_to, $quiet, $suppress_from, $no_signed_off_cc,
+ $dry_run) = (1, 1, 0, 0, 0, 0);
my $smtp_server;
my $envelope_sender;
$term = new FakeTerm "$@: going non-interactive";
}
-my $def_chain = $repo->config_bool('sendemail.chainreplyto');
-if (defined $def_chain and not $def_chain) {
- $chain_reply_to = 0;
+my %config_settings = (
+ "threaded" => \$threaded,
+ "chainreplyto" => \$chain_reply_to,
+);
+
+foreach my $setting (keys %config_settings) {
+ my $default = $repo->config_bool("sendemail.$setting");
+ if (defined $default) {
+ $config_settings{$setting} = $default ? 1 : 0;
+ }
}
@bcclist = $repo->config('sendemail.bcc');
"no-signed-off-cc|no-signed-off-by-cc" => \$no_signed_off_cc,
"dry-run" => \$dry_run,
"envelope-sender=s" => \$envelope_sender,
+ "threaded!" => \$threaded,
);
unless ($rc) {
$prompting++;
}
-if (!defined $initial_reply_to && $prompting) {
+if ($threaded && !defined $initial_reply_to && $prompting) {
do {
$_= $term->readline("Message-ID to be used as In-Reply-To for the first email? ",
$initial_reply_to);
Message-Id: $message_id
X-Mailer: git-send-email $gitversion
";
- if ($reply_to) {
+ if ($threaded && $reply_to) {
$header .= "In-Reply-To: $reply_to\n";
$header .= "References: $references\n";