Re: git-send-email: smtpserver in $HOME
- From
Jeff King <peff@peff.net>
- Date
- Feb 16, 2021, 15:45 UTC
- Message-ID
- <YCvotU6KVruFuf9/@coredump.intra.peff.net>
- In-Reply-To
- <xmqqo8gksqr4.fsf@gitster.c.googlers.com>
On Mon, Feb 15, 2021 at 06:14:39PM -0800, Junio C Hamano wrote:
Show 9 quoted lines
> Jan “Khardix” Staněk <khardix@gmail.com> writes: > > > Would it be feasible to treat the `smtpserver` as path option > > and expand `~`/`~user` paths? > > Would it break anything > > (i.e., is `~` a valid character for beginning of a hostname)? > > I haven't given too much thought, but offhand do not think of a > reason why a change like the attached would break things.
I agree it's unlikely to break anything.
Still, it seems a bit unusual for an executed program to handle tilde like this. The usual mechanism is for us to run it with the shell and expect to find it in $PATH.
It looks like there's some weirdness here, though; $smtp_server may be a hostname, and it looks like we use "/" to distinguish a file path. I wonder if allowing "!my-sendmail" would be more consistent with other parts of Git (not to mention more flexible).
-Peff