From: Jeff King <peff@peff.net>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Jared Hance <jaredhance@gmail.com>,
gitster@pobox.com, git@vger.kernel.org
Subject: Re: [PATCH] Set GIT_PATHNAME_PREFIX with aliases.
Date: Wed, 5 May 2010 03:01:31 -0400 [thread overview]
Message-ID: <20100505070131.GA11265@coredump.intra.peff.net> (raw)
In-Reply-To: <4BE115EF.8010306@viscovery.net>
On Wed, May 05, 2010 at 08:53:35AM +0200, Johannes Sixt wrote:
> Am 5/5/2010 2:51, schrieb Jeff King:
> > On Tue, May 04, 2010 at 08:25:22PM -0400, Jared Hance wrote:
> >
> >> The environment variable GIT_PATHNAME_PREFIX passes on the
> >> current working directory (where the git command was called from)
> >> to shell aliases (aliases that begin with "!"). This allows these
> >> shell aliases to know the directory that the git command was called
> >> from.
> >
> > Seems like a reasonable goal, but...
>
> Sorry, I disagree.
> [reasons why it sucks]
Yes, I agree it sucks. The problem is that this information is totally
lost now for shell aliases, so you can't even do these painful things.
Your alias simply doesn't have access to that information at all. I am
open to better interfaces (my "reasonable" above was not a ringing
endorsement, but rather "I can see why you might want to do this").
> The only way where this variable could be used in a useful manner is to
> write the alias as
>
> !cd "${GIT_PATHNAME_PREFIX:-.}" && { do stuff... ; }
Agreed that is the only sane thing to do with it, but...
> which is something that git should do before it invokes the alias.
Wouldn't we then be breaking existing aliases which do not expect this
new behavior?
-Peff
next prev parent reply other threads:[~2010-05-05 7:01 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-05 0:25 [PATCH] Set GIT_PATHNAME_PREFIX with aliases Jared Hance
2010-05-05 0:51 ` Jeff King
2010-05-05 6:53 ` Johannes Sixt
2010-05-05 7:01 ` Jeff King [this message]
2010-05-05 7:52 ` Eli Barzilay
2010-05-05 16:07 ` Junio C Hamano
2010-05-05 20:28 ` [PATCH] An alias that starts with "!!" runs in the current directory Eli Barzilay
2010-05-05 20:52 ` [PATCH] An alias that starts with "!!" " Jared Hance
2010-05-05 20:58 ` Eli Barzilay
2010-05-05 21:00 ` Eli Barzilay
2010-05-05 21:24 ` Re-submitting patches Jonathan Nieder
2010-05-05 21:28 ` Eli Barzilay
2010-05-05 21:31 ` [PATCH v2] An alias that starts with "!!" runs in the current directory Eli Barzilay
2010-05-05 22:22 ` Will Palmer
2010-05-05 22:33 ` Eli Barzilay
2010-05-05 23:43 ` Junio C Hamano
2010-05-06 0:05 ` Adam Brewster
2010-05-06 6:21 ` Will Palmer
2010-05-06 6:26 ` Will Palmer
2010-05-06 6:36 ` Johannes Sixt
2010-05-06 7:02 ` Matthieu Moy
2010-05-05 22:02 ` [PATCH] " Junio C Hamano
2010-05-05 22:13 ` Eli Barzilay
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=20100505070131.GA11265@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
--cc=jaredhance@gmail.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).