From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: builtin command's prefix question
Date: Thu, 6 Dec 2007 15:48:02 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.64.0712061547070.27959@racer.site> (raw)
In-Reply-To: <fcaeb9bf0712060726r383c3a36j798a439b9dbb0cae@mail.gmail.com>
Hi,
On Thu, 6 Dec 2007, Nguyen Thai Ngoc Duy wrote:
> On Dec 6, 2007 6:22 AM, Junio C Hamano <gitster@pobox.com> wrote:
> > However, if we define setup() to behave this way when GIT_DIR is not
> > defined and GIT_WORK_TREE is:
> >
> > (1) internally pretend as if GIT_DIR was specified to be the
> > directory where the command was started from (iow, do getcwd()
> > once upon startup);
> >
> > (2) chdir to GIT_WORK_TREE (which means "callers of setup() always
> > run from the top of the work tree");
> >
> > (3) set prefix to NULL;
>
> (1) is fine by me, even if it goes up to find a gitdir. But (3), no,
> prefix should be set as relative path from worktree top directory to
> user current directory, not NULL.
If you expect "git <command> <filespec>" to work correctly from GIT_DIR,
you will _have_ to set the prefix to NULL.
Ciao,
Dscho
next prev parent reply other threads:[~2007-12-06 15:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-05 16:56 builtin command's prefix question Nguyen Thai Ngoc Duy
2007-12-05 22:12 ` Junio C Hamano
2007-12-05 23:22 ` Junio C Hamano
2007-12-05 23:43 ` Junio C Hamano
2007-12-06 15:26 ` Nguyen Thai Ngoc Duy
2007-12-06 15:48 ` Johannes Schindelin [this message]
2007-12-06 16:04 ` 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=Pine.LNX.4.64.0712061547070.27959@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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).