All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Jan “Khardix” Staněk" <khardix@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git-send-email: smtpserver in $HOME
Date: Tue, 16 Feb 2021 10:53:39 -0800	[thread overview]
Message-ID: <xmqq7dn7rgi4.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <CAG+K25NbifB9k9ugU5ZjLAOKxLyfEZcphfZXNS9_Whi6gZcBLA@mail.gmail.com> ("Jan =?utf-8?Q?=E2=80=9CKhardix=E2=80=9D_Stan=C4=9Bk=22's?= message of "Tue, 16 Feb 2021 04:49:20 -0800")

Jan “Khardix” Staněk  <khardix@gmail.com> writes:

> On 2021-02-15, Junio C Hamano wrote:
>> I haven't given too much thought, but offhand do not think of a
>> reason why a change like the attached would break things.
>
> Seems reasonable, but I figured I rather ask beforehand.
>
>>  git-send-email.perl | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git c/git-send-email.perl w/git-send-email.perl
>> index 1f425c0809..ff58ac5046 100755
>> --- c/git-send-email.perl
>> +++ w/git-send-email.perl
>> @@ -1006,6 +1006,8 @@ sub expand_one_alias {
>>  		}
>>  	}
>>  	$smtp_server ||= 'localhost'; # could be 127.0.0.1, too... *shrug*
>> +} elsif ($smtp_server =~ /^~/) {
>> +	$smtp_server = glob($smtp_server);
>>  }
>
> This introduces a special case just for handling $smtp_server…

Yes, and that was very much deliberate, as I think

	git send-email --smtp-server=~/bin/my-phoney-sendmail

won't be affected by %config_path_settings.  $smtp_ssl_cert_path has
the same problem already, and I didn't want to make things worse (I
think %config_path_settings is a mistake---it is fine to have a list
of variables that can use ~tilde expansion, but I do not see why it
makes sense to allow the ~tilde expansion when the value came from
configureation files, and not from the command line).

> My concern was that if there is a SMTP server actually named
> i.e. `~someone.example.org`, this change would break that.

Can tilde appear in a valid DNS name?  I doubt it.

  reply	other threads:[~2021-02-16 18:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-15 14:07 git-send-email: smtpserver in $HOME Jan “Khardix” Staněk
2021-02-16  2:14 ` Junio C Hamano
2021-02-16 12:49   ` Jan “Khardix” Staněk
2021-02-16 18:53     ` Junio C Hamano [this message]
2021-02-16 22:14       ` Jan “Khardix” Staněk
2021-02-18 10:18         ` Chris Torek
2021-02-18 12:57           ` Andreas Schwab
2021-02-16 15:45   ` Jeff King
2021-02-16 18:57     ` Junio C Hamano
2021-02-16 19:05       ` Jeff King
2021-02-16 19:16         ` Junio C Hamano
2021-02-16 19:23           ` Jeff King
2021-02-16 22:31         ` Jan “Khardix” Staněk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq7dn7rgi4.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=khardix@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.