git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Gregory Anders <greg@gpanders.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-send-email: use ! to indicate relative path to command
Date: Tue, 11 May 2021 15:11:51 -0400	[thread overview]
Message-ID: <YJrW98FZN/N6u7un@coredump.intra.peff.net> (raw)
In-Reply-To: <YJrVBA4HP0HEqRLD@gpanders.com>

On Tue, May 11, 2021 at 01:03:32PM -0600, Gregory Anders wrote:

> I also noticed this after some quick testing and just sent a v2 right before
> seeing your reply.
> 
> Your (untested) implementation seems much cleaner than mine, and I'm happy
> to give that a try. Question: is it okay that we pass just a raw command
> name to exec instead of a full path? That is, is there any reason we need to
> first find the command in PATH *and then* pass it to exec (which is what my
> v2 implementation does)?

I don't think so. Perl's exec() should do the PATH lookup itself. I was
surprised not to see this mentioned explicitly in the documentation, but
it clearly does work. E.g., try:

  perl -e 'exec("ls")'

-Peff

      reply	other threads:[~2021-05-11 19:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 18:37 [PATCH] git-send-email: use ! to indicate relative path to command Gregory Anders
2021-05-11 18:57 ` Jeff King
2021-05-11 19:03   ` Gregory Anders
2021-05-11 19:11     ` Jeff King [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=YJrW98FZN/N6u7un@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).