All of lore.kernel.org
 help / color / mirror / 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

* 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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.