* [PATCH] send-email: Add config option for sender address
@ 2009-02-19 1:00 Trent Piepho
2009-04-10 0:34 ` Nanako Shiraishi
0 siblings, 1 reply; 4+ messages in thread
From: Trent Piepho @ 2009-02-19 1:00 UTC (permalink / raw)
To: git; +Cc: Trent Piepho, gitster
The sender address, as specified with the '--from' command line option,
couldn't be set in the config file. So add a new config option,
'sendemail.from', which sets it. One can use 'sendemail.<identity>.from'
as well of course, which is likely the more useful case.
The sender address would default to GIT_AUTHOR_IDENT, which is usually the
right thing, but this doesn't allow switching based on the identity
selected. It's possible to switch the SMTP server and envelope sender by
using the '--identity' option, in which case one probably wants to use a
different from address as well, but this had to be manually specified.
The docs are also fixed up somewhat. If '--from' is specified (or the new
sendemail.from option is used) then the user isn't prompted. The default
with no '--from' option (or sendemail.from option) is GIT_AUTHOR_IDENT
first then GIT_COMMITTER_IDENT, not just GIT_COMMITTER_IDENT.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
---
Documentation/git-send-email.txt | 9 ++++++---
git-send-email.perl | 1 +
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index ff4aeff..8345df2 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -57,9 +57,12 @@ If it wasn't able to see a header in the summary it will ask you about it
interactively after quitting your editor.
--from::
- Specify the sender of the emails. This will default to
- the value GIT_COMMITTER_IDENT, as returned by "git var -l".
- The user will still be prompted to confirm this entry.
+ Specify the sender of the emails. If not specified on the command line,
+ the value of the 'sendemail.from' configuration option is used. If
+ neither the command line option nor 'sendemail.from' are set, then the
+ user will be prompted for the value. The default for the prompt will be
+ the value of GIT_AUTHOR_IDENT, or GIT_COMMITTER_IDENT if that is not
+ set, as returned by "git var -l".
--in-reply-to::
Specify the contents of the first In-Reply-To header.
diff --git a/git-send-email.perl b/git-send-email.perl
index 77ca8fe..ec58f12 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -207,6 +207,7 @@ my %config_settings = (
"suppresscc" => \@suppress_cc,
"envelopesender" => \$envelope_sender,
"multiedit" => \$multiedit,
+ "from" => \$sender,
);
# Handle Uncouth Termination
--
1.5.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] send-email: Add config option for sender address
2009-02-19 1:00 [PATCH] send-email: Add config option for sender address Trent Piepho
@ 2009-04-10 0:34 ` Nanako Shiraishi
2009-04-13 7:45 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Nanako Shiraishi @ 2009-04-10 0:34 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Trent Piepho
Quoting Trent Piepho:
> The sender address, as specified with the '--from' command line option,
> couldn't be set in the config file. So add a new config option,
> 'sendemail.from', which sets it. One can use 'sendemail.<identity>.from'
> as well of course, which is likely the more useful case.
>
> The sender address would default to GIT_AUTHOR_IDENT, which is usually the
> right thing, but this doesn't allow switching based on the identity
> selected. It's possible to switch the SMTP server and envelope sender by
> using the '--identity' option, in which case one probably wants to use a
> different from address as well, but this had to be manually specified.
>
> The docs are also fixed up somewhat. If '--from' is specified (or the new
> sendemail.from option is used) then the user isn't prompted. The default
> with no '--from' option (or sendemail.from option) is GIT_AUTHOR_IDENT
> first then GIT_COMMITTER_IDENT, not just GIT_COMMITTER_IDENT.
>
> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Junio, may I ask what happened to this patch?
--
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] send-email: Add config option for sender address
2009-04-10 0:34 ` Nanako Shiraishi
@ 2009-04-13 7:45 ` Junio C Hamano
2009-05-12 22:48 ` [PATCH v2] " Trent Piepho
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2009-04-13 7:45 UTC (permalink / raw)
To: Nanako Shiraishi; +Cc: git, Trent Piepho
Nanako Shiraishi <nanako3@lavabit.com> writes:
> Quoting Trent Piepho:
>
>> The sender address, as specified with the '--from' command line option,
>> couldn't be set in the config file. So add a new config option,
>> 'sendemail.from', which sets it. One can use 'sendemail.<identity>.from'
>> as well of course, which is likely the more useful case.
>>
>> The sender address would default to GIT_AUTHOR_IDENT, which is usually the
>> right thing, but this doesn't allow switching based on the identity
>> selected. It's possible to switch the SMTP server and envelope sender by
>> using the '--identity' option, in which case one probably wants to use a
>> different from address as well, but this had to be manually specified.
>>
>> The docs are also fixed up somewhat. If '--from' is specified (or the new
>> sendemail.from option is used) then the user isn't prompted. The default
>> with no '--from' option (or sendemail.from option) is GIT_AUTHOR_IDENT
>> first then GIT_COMMITTER_IDENT, not just GIT_COMMITTER_IDENT.
>>
>> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
>
> Junio, may I ask what happened to this patch?
If I recall correctly, it didn't look too invasive and I found it Ok, but
I didn't see any comments on it, so it was dropped on the floor.
Perhaps Trent cares to resend?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] send-email: Add config option for sender address
2009-04-13 7:45 ` Junio C Hamano
@ 2009-05-12 22:48 ` Trent Piepho
0 siblings, 0 replies; 4+ messages in thread
From: Trent Piepho @ 2009-05-12 22:48 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Nanako Shiraishi, git, Trent Piepho, gitster
The sender address, as specified with the '--from' command line option,
couldn't be set in the config file. So add a new config option,
'sendemail.from', which sets it. One can use 'sendemail.<identity>.from'
as well of course, which is likely the more useful case.
The sender address would default to GIT_AUTHOR_IDENT, which is usually the
right thing, but this doesn't allow switching based on the identity
selected. It's possible to switch the SMTP server and envelope sender by
using the '--identity' option, in which case one probably wants to use a
different from address as well, but this had to be manually specified.
The documentation for 'from' is also corrected somewhat. If '--from' is
specified (or the new sendemail.from option is used) then the user isn't
prompted. The default with no '--from' option (or sendemail.from option)
is GIT_AUTHOR_IDENT first then GIT_COMMITTER_IDENT, not just
GIT_COMMITTER_IDENT.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
---
v2: Updated to latest git
Documentation/git-send-email.txt | 9 ++++++---
git-send-email.perl | 1 +
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index 794224b..f940770 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -69,9 +69,12 @@ and In-Reply-To headers will be used unless they are removed.
Missing From or In-Reply-To headers will be prompted for.
--from=<address>::
- Specify the sender of the emails. This will default to
- the value GIT_COMMITTER_IDENT, as returned by "git var -l".
- The user will still be prompted to confirm this entry.
+ Specify the sender of the emails. If not specified on the command line,
+ the value of the 'sendemail.from' configuration option is used. If
+ neither the command line option nor 'sendemail.from' are set, then the
+ user will be prompted for the value. The default for the prompt will be
+ the value of GIT_AUTHOR_IDENT, or GIT_COMMITTER_IDENT if that is not
+ set, as returned by "git var -l".
--in-reply-to=<identifier>::
Specify the contents of the first In-Reply-To header.
diff --git a/git-send-email.perl b/git-send-email.perl
index cccbf45..d9c7f32 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -210,6 +210,7 @@ my %config_settings = (
"envelopesender" => \$envelope_sender,
"multiedit" => \$multiedit,
"confirm" => \$confirm,
+ "from" => \$sender,
);
# Handle Uncouth Termination
--
1.5.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-05-12 22:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-19 1:00 [PATCH] send-email: Add config option for sender address Trent Piepho
2009-04-10 0:34 ` Nanako Shiraishi
2009-04-13 7:45 ` Junio C Hamano
2009-05-12 22:48 ` [PATCH v2] " Trent Piepho
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).