git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-send-email: smtpserver in $HOME

From
Jan “Khardix” Staněk <khardix@gmail.com>
Date
Feb 16, 2021, 22:14 UTC
Message-ID
<CAG+K25NC3H7L5TpxmR_kCvmqR8GPdCEdTt740F34ON4TWoPCpg@mail.gmail.com>
In-Reply-To
<xmqq7dn7rgi4.fsf@gitster.c.googlers.com>
On 2021-02-16, Junio C Hamano wrote:
Show 13 quoted lines
> Jan “Khardix” Staněk  <khardix@gmail.com> writes:
> > 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).

Well, unless I'm missing something, shouldn't the tilde above be expanded by the shell before actually being passed as argument?

$ echo simulate --smtp-server=~/bin/my-phoney-sendmail simulate --smtp-server=/home/khardix/bin/my-phoney-sendmail

I assumed that only the config values are handled specially because only they need that – the CLI is handled by shell in advance. Never played with $smtp_ssl_cert_path though, so if there are known problems, just ignore me – or better, point me to the relevant issue/discussion, if you can be bothered :) Thanks.

> > 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.

So I actually did my homework and skimmed through the relevant RFCs (RFC952 and RFC1123); as it turns out, no, it cannot – only ASCII alphanumerics, '-' and '.' are valid characters. -- Jan Staněk – Khardix

Previous: Junio C HamanoNext: Chris Torek
Message 5 of 13 in “git-send-email: smtpserver in $HOME”
  1. Jan “Khardix” StaněkFeb 15, 2021
  2. Junio C HamanoFeb 16, 2021
  3. Jan “Khardix” StaněkFeb 16, 2021
  4. Junio C HamanoFeb 16, 2021
  5. Jan “Khardix” StaněkFeb 16, 2021
  6. Chris TorekFeb 18, 2021
  7. Andreas SchwabFeb 18, 2021
  8. Jeff KingFeb 16, 2021
  9. Junio C HamanoFeb 16, 2021
  10. Jeff KingFeb 16, 2021
  11. Junio C HamanoFeb 16, 2021
  12. Jeff KingFeb 16, 2021
  13. Jan “Khardix” StaněkFeb 16, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.