Re: [RFC/PATCH] handle_alias: provide GIT_CWD to !alias
- From
Michael J Gruber <git@drmicha.warpmail.net>
- Date
- Apr 27, 2011, 06:47 UTC
- Message-ID
- <4DB7BBEF.8010409@drmicha.warpmail.net>
- In-Reply-To
- <7v1v0od557.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 27.04.2011 00:22:
Show 7 quoted lines
> Michael J Gruber <git@drmicha.warpmail.net> 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