Skip to content

Commit

Permalink
git-send-email: configurable bcc and chain-reply-to
Browse files Browse the repository at this point in the history
Chain-reply-to is a personal perference, and is unlikely to change from
patchset to patchset.  Similarly, bcc is likely to have the same values
every invocation is one likes to bcc oneself.

So, allow both to be set via configuration variables.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Avi Kivity authored and Junio C Hamano committed Mar 12, 2007
1 parent 240c77c commit 4a62d3f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Documentation/git-send-email.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ The --cc option must be repeated for each user you want on the cc list.
the first will be sent as replies to the first email sent. When using
this, it is recommended that the first file given be an overview of the
entire patch series.
Default is --chain-reply-to
Default is the value of the 'sendemail.chainreplyto' configuration
value; if that is unspecified, default to --chain-reply-to.

--compose::
Use $EDITOR to edit an introductory message for the
Expand Down Expand Up @@ -101,6 +102,13 @@ sendemail.aliasfiletype::
Format of the file(s) specified in sendemail.aliasesfile. Must be
one of 'mutt', 'mailrc', 'pine', or 'gnus'.

sendemail.bcc::
Email address (or alias) to always bcc.

sendemail.chainreplyto::
Boolean value specifying the default to the '--chain_reply_to'
parameter.

sendemail.smtpserver::
Default smtp server to use.

Expand Down
10 changes: 10 additions & 0 deletions git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@ sub format_2822_time {
$term = new FakeTerm "$@: going non-interactive";
}

my $def_chain = $repo->config_boolean('sendemail.chainreplyto');
if ($def_chain and $def_chain eq 'false') {
$chain_reply_to = 0;
}

@bcclist = $repo->config('sendemail.bcc');
if (!@bcclist or !$bcclist[0]) {
@bcclist = ();
}

# Begin by accumulating all the variables (defined above), that we will end up
# needing, first, from the command line:

Expand Down

0 comments on commit 4a62d3f

Please sign in to comment.