Re: [SQUASHED PATCH] Add support for GIT_CEILING_DIRECTORIES
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- May 16, 2008, 10:20 UTC
- Message-ID
- <alpine.DEB.1.00.0805161118160.30431@racer>
- In-Reply-To
- <482D2F9D.4080809@viscovery.net>
Hi,
On Fri, 16 May 2008, Johannes Sixt wrote:
Show 16 quoted lines
> Johannes Schindelin schrieb: > > +'GIT_CEILING_DIRECTORIES':: > > + If set (to a colon delimited list of absolute directories), Git > > + will refuse to look for the .git/ directory further when hitting > > + one of those directories (otherwise it would traverse the parent > > + directories until hitting the root directory). > > Hmm. > > Looking at the current implementation, this should be written as: > > If set to a colon delimited list of absolute directories, > and the current directory is in or below one of them, then > these are the top-most directories in which Git will look for > a .git/ directory (otherwise it would traverse the parent > directories until hitting the root directory).
According to the test case
GIT_CEILING_DIRECTORIES="$CWD/X:$CWD/subdir" &&
export GIT_CEILING_DIRECTORIES &&
(cd subdir && test_must_fail git rev-parse --git-dir)this is not the case. If you have something like /bla/subdir and you are in /bla/subdir, it will not look for .git/.
Ciao, Dscho "who leaves it as an exercise to the reader to see why the code does what it does"