git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Antony Stubbs <antony.stubbs@gmail.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: cvs import and internal plumbing commands
Date: Mon, 20 Jul 2009 11:34:00 -0400	[thread overview]
Message-ID: <20090720153400.GE5347@coredump.intra.peff.net> (raw)
In-Reply-To: <7vprbwvzu7.fsf@alter.siamese.dyndns.org>

On Sun, Jul 19, 2009 at 07:43:28PM -0700, Junio C Hamano wrote:

> We encourage script writers to just prepend "git --exec-path" at the
> beginning of their PATH and give guarantee that this simple procedure will
> keep their scripts working, so it might be a good idea to have an example
> for that as well.

I had it in my head that such a strategy was supposed to be a temporary
step in the process of getting rid of dashed forms. That is, you can do
that now to avoid having your scripts break, but in the long run, you
should be converting to the space form.

But I guess the plan was softened, and we have no deprecation plan for
dashed forms in exec-path. So maybe my thinking was outdated.

> So the preferred fix might be just the matter of adding one line
> 
> 	$ENV{'PATH'} = `git --exec-path`. ":$ENV{'PATH'}";
> 
> at the beginning of the script.

I can see that for a totally third-party script which wanted to use git
plumbing.  But why do that for a git-* script? The "git" wrapper sets up
the environment like that already.

-Peff

  reply	other threads:[~2009-07-20 15:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-05  2:43 cvs import and internal plumbing commands Antony Stubbs
2009-07-05  6:28 ` Antony Stubbs
2009-07-06 12:15   ` [PATCH 1/1] " astubbs
2009-07-16 10:01 ` Jeff King
2009-07-17 21:44   ` Antony Stubbs
2009-07-17 21:45     ` Jeff King
2009-07-17 21:59       ` Antony Stubbs
2009-07-19 23:57         ` [PATCH] " Antony Stubbs
2009-07-20  2:43       ` Junio C Hamano
2009-07-20 15:34         ` Jeff King [this message]
2009-07-21 23:24           ` Antony Stubbs
2009-07-22  0:43             ` Junio C Hamano
2009-07-22  2:59               ` Jeff King
2009-07-22  3:06                 ` Junio C Hamano

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=20090720153400.GE5347@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=antony.stubbs@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).