{"thread":{"id":"17880","subject":"[PATCH] send-email: Add config option for sender address","startedAt":"2009-02-19T01:00:38Z","lastAt":"2009-05-12T22:48:56Z","messageCount":4,"participants":["Trent Piepho","Nanako Shiraishi","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"105368","messageId":"1235005238-15500-1-git-send-email-xyzzy@speakeasy.org","threadId":"17880","inReplyTo":null,"subject":"[PATCH] send-email: Add config option for sender address","fromName":"Trent Piepho","fromEmail":"xyzzy@speakeasy.org","sentAt":"2009-02-19T01:00:38Z","receivedAt":"2009-02-19T01:00:38Z","isPatch":true,"sender":{"key":"tpiepho@gmail.com","avatar":null},"body":"The sender address, as specified with the '--from' command line option,\ncouldn't be set in the config file.  So add a new config option,\n'sendemail.from', which sets it.  One can use 'sendemail.<identity>.from'\nas well of course, which is likely the more useful case.\n\nThe sender address would default to GIT_AUTHOR_IDENT, which is usually the\nright thing, but this doesn't allow switching based on the identity\nselected.  It's possible to switch the SMTP server and envelope sender by\nusing the '--identity' option, in which case one probably wants to use a\ndifferent from address as well, but this had to be manually specified.\n\nThe docs are also fixed up somewhat.  If '--from' is specified (or the new\nsendemail.from option is used) then the user isn't prompted.  The default\nwith no '--from' option (or sendemail.from option) is GIT_AUTHOR_IDENT\nfirst then GIT_COMMITTER_IDENT, not just GIT_COMMITTER_IDENT.\n\nSigned-off-by: Trent Piepho <xyzzy@speakeasy.org>\n---\n Documentation/git-send-email.txt |    9 ++++++---\n git-send-email.perl              |    1 +\n 2 files changed, 7 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt\nindex ff4aeff..8345df2 100644\n--- a/Documentation/git-send-email.txt\n+++ b/Documentation/git-send-email.txt\n@@ -57,9 +57,12 @@ If it wasn't able to see a header in the summary it will ask you about it\n interactively after quitting your editor.\n \n --from::\n-\tSpecify the sender of the emails.  This will default to\n-\tthe value GIT_COMMITTER_IDENT, as returned by \"git var -l\".\n-\tThe user will still be prompted to confirm this entry.\n+\tSpecify the sender of the emails.  If not specified on the command line,\n+\tthe value of the 'sendemail.from' configuration option is used.  If\n+\tneither the command line option nor 'sendemail.from' are set, then the\n+\tuser will be prompted for the value.  The default for the prompt will be\n+\tthe value of GIT_AUTHOR_IDENT, or GIT_COMMITTER_IDENT if that is not\n+\tset, as returned by \"git var -l\".\n \n --in-reply-to::\n \tSpecify the contents of the first In-Reply-To header.\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 77ca8fe..ec58f12 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -207,6 +207,7 @@ my %config_settings = (\n     \"suppresscc\" => \\@suppress_cc,\n     \"envelopesender\" => \\$envelope_sender,\n     \"multiedit\" => \\$multiedit,\n+    \"from\" => \\$sender,\n );\n \n # Handle Uncouth Termination\n-- \n1.5.4.1\n"},{"id":"110974","messageId":"20090410093432.6117@nanako3.lavabit.com","threadId":"17880","inReplyTo":"1235005238-15500-1-git-send-email-xyzzy@speakeasy.org","subject":"Re: [PATCH] send-email: Add config option for sender address","fromName":"Nanako Shiraishi","fromEmail":"nanako3@lavabit.com","sentAt":"2009-04-10T00:34:32Z","receivedAt":"2009-04-10T00:34:32Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting Trent Piepho:\n\n> The sender address, as specified with the '--from' command line option,\n> couldn't be set in the config file.  So add a new config option,\n> 'sendemail.from', which sets it.  One can use 'sendemail.<identity>.from'\n> as well of course, which is likely the more useful case.\n> \n> The sender address would default to GIT_AUTHOR_IDENT, which is usually the\n> right thing, but this doesn't allow switching based on the identity\n> selected.  It's possible to switch the SMTP server and envelope sender by\n> using the '--identity' option, in which case one probably wants to use a\n> different from address as well, but this had to be manually specified.\n> \n> The docs are also fixed up somewhat.  If '--from' is specified (or the new\n> sendemail.from option is used) then the user isn't prompted.  The default\n> with no '--from' option (or sendemail.from option) is GIT_AUTHOR_IDENT\n> first then GIT_COMMITTER_IDENT, not just GIT_COMMITTER_IDENT.\n> \n> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>\n\nJunio, may I ask what happened to this patch?\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n"},{"id":"111166","messageId":"7v1vrxhu8x.fsf@gitster.siamese.dyndns.org","threadId":"17880","inReplyTo":"20090410093432.6117@nanako3.lavabit.com","subject":"Re: [PATCH] send-email: Add config option for sender address","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-04-13T07:45:34Z","receivedAt":"2009-04-13T07:45:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nanako Shiraishi <nanako3@lavabit.com> writes:\n\n> Quoting Trent Piepho:\n>\n>> The sender address, as specified with the '--from' command line option,\n>> couldn't be set in the config file.  So add a new config option,\n>> 'sendemail.from', which sets it.  One can use 'sendemail.<identity>.from'\n>> as well of course, which is likely the more useful case.\n>> \n>> The sender address would default to GIT_AUTHOR_IDENT, which is usually the\n>> right thing, but this doesn't allow switching based on the identity\n>> selected.  It's possible to switch the SMTP server and envelope sender by\n>> using the '--identity' option, in which case one probably wants to use a\n>> different from address as well, but this had to be manually specified.\n>> \n>> The docs are also fixed up somewhat.  If '--from' is specified (or the new\n>> sendemail.from option is used) then the user isn't prompted.  The default\n>> with no '--from' option (or sendemail.from option) is GIT_AUTHOR_IDENT\n>> first then GIT_COMMITTER_IDENT, not just GIT_COMMITTER_IDENT.\n>> \n>> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>\n>\n> Junio, may I ask what happened to this patch?\n\nIf I recall correctly, it didn't look too invasive and I found it Ok, but\nI didn't see any comments on it, so it was dropped on the floor.\n\nPerhaps Trent cares to resend?\n"},{"id":"113707","messageId":"1242168536-15057-1-git-send-email-xyzzy@speakeasy.org","threadId":"17880","inReplyTo":"7v1vrxhu8x.fsf@gitster.siamese.dyndns.org","subject":"[PATCH v2] send-email: Add config option for sender address","fromName":"Trent Piepho","fromEmail":"xyzzy@speakeasy.org","sentAt":"2009-05-12T22:48:56Z","receivedAt":"2009-05-12T22:48:56Z","isPatch":true,"sender":{"key":"tpiepho@gmail.com","avatar":null},"body":"The sender address, as specified with the '--from' command line option,\ncouldn't be set in the config file.  So add a new config option,\n'sendemail.from', which sets it.  One can use 'sendemail.<identity>.from'\nas well of course, which is likely the more useful case.\n\nThe sender address would default to GIT_AUTHOR_IDENT, which is usually the\nright thing, but this doesn't allow switching based on the identity\nselected.  It's possible to switch the SMTP server and envelope sender by\nusing the '--identity' option, in which case one probably wants to use a\ndifferent from address as well, but this had to be manually specified.\n\nThe documentation for 'from' is also corrected somewhat.  If '--from' is\nspecified (or the new sendemail.from option is used) then the user isn't\nprompted.  The default with no '--from' option (or sendemail.from option)\nis GIT_AUTHOR_IDENT first then GIT_COMMITTER_IDENT, not just\nGIT_COMMITTER_IDENT.\n\nSigned-off-by: Trent Piepho <xyzzy@speakeasy.org>\n---\nv2: Updated to latest git\n\n Documentation/git-send-email.txt |    9 ++++++---\n git-send-email.perl              |    1 +\n 2 files changed, 7 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt\nindex 794224b..f940770 100644\n--- a/Documentation/git-send-email.txt\n+++ b/Documentation/git-send-email.txt\n@@ -69,9 +69,12 @@ and In-Reply-To headers will be used unless they are removed.\n Missing From or In-Reply-To headers will be prompted for.\n \n --from=<address>::\n-\tSpecify the sender of the emails.  This will default to\n-\tthe value GIT_COMMITTER_IDENT, as returned by \"git var -l\".\n-\tThe user will still be prompted to confirm this entry.\n+\tSpecify the sender of the emails.  If not specified on the command line,\n+\tthe value of the 'sendemail.from' configuration option is used.  If\n+\tneither the command line option nor 'sendemail.from' are set, then the\n+\tuser will be prompted for the value.  The default for the prompt will be\n+\tthe value of GIT_AUTHOR_IDENT, or GIT_COMMITTER_IDENT if that is not\n+\tset, as returned by \"git var -l\".\n \n --in-reply-to=<identifier>::\n \tSpecify the contents of the first In-Reply-To header.\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex cccbf45..d9c7f32 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -210,6 +210,7 @@ my %config_settings = (\n     \"envelopesender\" => \\$envelope_sender,\n     \"multiedit\" => \\$multiedit,\n     \"confirm\"   => \\$confirm,\n+    \"from\" => \\$sender,\n );\n \n # Handle Uncouth Termination\n-- \n1.5.4.1\n"}]}