From: Jeff King <peff@peff.net>
To: Gregory Anders <greg@gpanders.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v3] git-send-email: use ! to indicate relative path to command
Date: Tue, 11 May 2021 15:24:28 -0400 [thread overview]
Message-ID: <YJrZ7Hho6jrVyM7f@coredump.intra.peff.net> (raw)
In-Reply-To: <20210511191510.25888-1-greg@gpanders.com>
On Tue, May 11, 2021 at 01:15:11PM -0600, Gregory Anders wrote:
> When the smtpServer config option is prefixed with a ! character, the
> value of the option should be interpreted as a command to look up on
> PATH.
This tells us "what", but the commit message is a good place to describe
"why". That helps reviewers now understand what you're trying to
accomplish, and why this is a good way to do it rather than some other
patch.
IMHO the most important "why" here is that there currently is no way to
specify a local smtp server program without using a full path.
I think this is a good direction to fix it, though for anybody just
seeing this patch, I'd call attention to the nearby thread (and the one
it links to):
https://lore.kernel.org/git/YJrH8uqzapnpNEsb@gpanders.com/
> git-send-email.perl | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
We'd probably want a test here, as well; see t/t9001-send-email.sh.
We implicitly test the absolute-path behavior in that script because
pass "--smtp-server=$(pwd)/fake.sendmail" in lots of places. But we'd
probably want a new test block that checks that:
PATH=$(pwd):$PATH \
git send-email --smtp-server="!fake.sendmail"
does what you expect.
-Peff
next prev parent reply other threads:[~2021-05-11 19:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 19:15 [PATCH v3] git-send-email: use ! to indicate relative path to command Gregory Anders
2021-05-11 19:24 ` Jeff King [this message]
2021-05-11 20:40 ` [PATCH v4] " Gregory Anders
2021-05-11 21:39 ` Jeff King
2021-05-11 22:18 ` Gregory Anders
2021-05-11 23:09 ` Junio C Hamano
2021-05-11 23:49 ` [PATCH v5] " Gregory Anders
2021-05-12 0:00 ` brian m. carlson
2021-05-12 0:35 ` Jeff King
2021-05-12 0:45 ` Gregory Anders
2021-05-12 0:49 ` Jeff King
2021-05-12 3:29 ` Junio C Hamano
2021-05-12 0:51 ` brian m. carlson
2021-05-11 20:03 ` [PATCH v3] " Felipe Contreras
2021-05-11 20:42 ` Gregory Anders
2021-05-11 22:07 ` Felipe Contreras
2021-05-11 22:19 ` Gregory Anders
2021-05-12 0:47 ` Jeff King
2021-05-12 1:08 ` Felipe Contreras
2021-05-12 1:24 ` Jeff King
2021-05-12 1:52 ` Felipe Contreras
2021-05-12 1:58 ` Gregory Anders
2021-05-12 4:17 ` Felipe Contreras
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=YJrZ7Hho6jrVyM7f@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=greg@gpanders.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).