Re: builtin command's prefix question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, 6 Dec 2007, Nguyen Thai Ngoc Duy wrote:

> On Dec 6, 2007 6:22 AM, Junio C Hamano <gitster@xxxxxxxxx> 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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux