Subject: Re: [RFC/PATCH] handle_alias: provide GIT_CWD to !alias

From: Michael J Gruber <[email-masked]>
Date: Wed, 27 Apr 2011 08:47:11 +0200

Junio C Hamano venit, vidit, dixit 27.04.2011 00:22:
> Michael J Gruber <[email-masked]> writes:
> 
>> Provide an environment variable GIT_CWD which contains the subdirectory
>> from which a !alias was called since these cd to the to level directory
>> before they are executed.
> 
> Isn't this what we usually call "prefix", though?

In code it is called "prefix". But I have to ask: So what? Are you
suggesting GIT_PREFIX? User expectation is probably more tied to CWD,
unless a user knows "rev-parse --show-prefix". I don't care about the
name, and GIT_PREFIX may be more systematic.

A more important point is the prefix-less case (i.e. we are in topdir):
Should GIT_YOUNAMEIT be empty then? I would say yes (just like
"rev-parse --show-prefix"), Duy said no. We need a third vote :)

Also, we may want to scrap this altogether and do !!-aliases instead
(without chdir).

Michael