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

2 messages, 2 authors, 2021-02-16 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2021-02-16 19:17:04

Jeff King [off-list ref] writes:
Sure, but you cannot say "does it refer to a local file" for a
non-absolute path.
Hmph, why not?  I would expect that this would work as a valid way

	$ git send-email --smtp-server=./my-phoney-smtp

to test a server substitute (perhaps for testing).  The only reason
why it does not is because file_name_is_absolute() check would not
like it.
And that is the source of the problem, IMHO: there is
no way to signal "this is a command I expect to be executed" except by
using an absolute path.
Yes.
Or do you mean that we should see if $smtp_server exists in the PATH,
and if so prefer it over a network hostname?
We can certainly go in that direction, too.  A new --smtp-program option
would be a cleaner way to solve it, though, as you said elsewhere.

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

From: Jeff King <hidden>
Date: 2021-02-16 19:24:29

On Tue, Feb 16, 2021 at 11:16:18AM -0800, Junio C Hamano wrote:
Jeff King [off-list ref] writes:
quoted
Sure, but you cannot say "does it refer to a local file" for a
non-absolute path.
Hmph, why not?  I would expect that this would work as a valid way

	$ git send-email --smtp-server=./my-phoney-smtp

to test a server substitute (perhaps for testing).  The only reason
why it does not is because file_name_is_absolute() check would not
like it.
Ah, sure. But you cannot say "my-phoney-smtp" and find it in the PATH,
because it is syntactically indistinguishable from a host with the same
name.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help