git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Matej Batic <matej.batic@ge.infn.it>
Subject: Re: [PATCH 2/2] handle_alias: provide GIT_PREFIX to !alias
Date: Wed, 27 Apr 2011 11:36:28 +0200	[thread overview]
Message-ID: <4DB7E39C.1040609@drmicha.warpmail.net> (raw)
In-Reply-To: <BANLkTi=gjuOqLEArk_0Nj1faEu62dzjbZA@mail.gmail.com>

Nguyen Thai Ngoc Duy venit, vidit, dixit 27.04.2011 11:06:
> 2011/4/27 Michael J Gruber <git@drmicha.warpmail.net>:
>> @@ -589,6 +589,8 @@ it will be treated as a shell command.  For example, defining
>>  "gitk --all --not ORIG_HEAD".  Note that shell commands will be
>>  executed from the top-level directory of a repository, which may
>>  not necessarily be the current directory.
>> +'GIT_PREFIX' is set as returned by running 'git rev-parse --show-prefix'
>> +from the original current directory. See linkgit:git-rev-parse[1].
> 
> It made me wonder "but then why should not we just do GIT_PREFIX=`git
> rev-parse --show-prefix` in the alias?" then realized by the time we
> do that, it's already too late. Maybe
> 
>> +'GIT_PREFIX' is set as returned by running 'git rev-parse --show-prefix'
>> +before current directory is changed to top-level directory. See linkgit:git-rev-parse[1].
> 
> ?

Well, the text says already that the alias is not run from the "original
current directory", so it's two ways of saying the same thing.

Michael

      reply	other threads:[~2011-04-27  9:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4DA59B27.50506@ge.infn.it>
2011-04-13 13:05 ` [RFC/PATCH] handle_alias: provide GIT_CWD to !alias Michael J Gruber
2011-04-13 13:12   ` Nguyen Thai Ngoc Duy
2011-04-13 13:16     ` Michael J Gruber
2011-04-13 13:24       ` Nguyen Thai Ngoc Duy
2011-04-26 22:22   ` Junio C Hamano
2011-04-27  6:47     ` Michael J Gruber
2011-04-27  7:40       ` Nguyen Thai Ngoc Duy
2011-04-27  8:10         ` Michael J Gruber
2011-04-27  8:36           ` [PATCH 1/2] t1020: test !alias in subdirectory Michael J Gruber
2011-04-27  8:36             ` [PATCH 2/2] handle_alias: provide GIT_PREFIX to !alias Michael J Gruber
2011-04-27  9:06               ` Nguyen Thai Ngoc Duy
2011-04-27  9:36                 ` Michael J Gruber [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=4DB7E39C.1040609@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=matej.batic@ge.infn.it \
    --cc=pclouds@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).