Re: [PATCH 8/8] Fix t1500 for sane work-tree behavior
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 27, 2007, 20:51 UTC
- Message-ID
- <7v8x91y3h7.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.64.0707271958590.14781@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 5 quoted lines
> 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.
It makes me wonder...
* When GIT_DIR=../../.git, and no worktree is specified, the
same holds true, with worktree is "../.."? (probably yes)* "GIT_DIR=../../foo/.git"? (I dunno)
* "GIT_DIR=../foo.git"? (probably not)
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.