Re: [PATCH 8/8] Fix t1500 for sane work-tree behavior

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

 



Hi,

On Fri, 27 Jul 2007, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:
> 
> > When GIT_DIR=../.git, and no worktree is specified, it is reasonable
> > to assume that the repository is not bare, that the work tree is ".."
> > and that the prefix is the basename of the current directory.
> >
> > This is the sane behavior.
> 
> That is a bit too strong blanket statement, while being weak on
> exact conditions, giving only one example.

Okay, let me defend it.

> It makes me wonder...
> 
>   * When GIT_DIR=../../.git, and no worktree is specified, the
>     same holds true, with worktree is "../.."? (probably yes)

You meant with "GIT_DIR=../.."? No.  In that case, I'd assume a bare 
repository, and we're inside the git directory, and unless the user 
specified a working tree, assume that we have none.

>   * "GIT_DIR=../../foo/.git"? (I dunno)

Unless ../../foo == .. no.  When we're outside, we're outside.

>   * "GIT_DIR=../foo.git"? (probably not)

Unless "$(basename "$(pwd)")" == foo.git, no.

> I am assuming that you meant something like this:
> 
>     When no worktree is specified, and GIT_DIR (or --git-dir=) is
>     zero or more "../" followed by ".git" after stripping trailing
>     and/or redundant slashes, it is reasonable to assume that the
>     repository is not bare, and the work tree is the parent
>     directory of the GIT_DIR directory.
> 
> but that requires guesswork if you give only one example and let
> the readers to guess.

Your explanation is really much more coherent than mine.  Please replace 
mine.

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