git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [SQUASHED PATCH] Add support for GIT_CEILING_DIRECTORIES

From
Johannes Sixt <j.sixt@viscovery.net>
Date
May 16, 2008, 10:50 UTC
Message-ID
<482D66DC.30602@viscovery.net>
In-Reply-To
<alpine.DEB.1.00.0805161118160.30431@racer>
Johannes Schindelin schrieb:
Show 28 quoted lines
> Hi,
> 
> On Fri, 16 May 2008, Johannes Sixt wrote:
> 
>> 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/.

No, the test just shows that it does not *find* a subdir/.git/, but it does not show that it doesn't even *look* for it.

Let's first clarify the semantics of GIT_CEILING_DIRECTORIES before we start fixing something: Can a directory that is named in GIT_CEILING_DIRECTORIES be a git repository or not?

David's original motivation was that it cannot; in your implementation it can.
-- Hannes
Previous: Johannes SchindelinNext: David Reiss
Message 11 of 20 in “Add support for GIT_CEILING_DIRS”
  1. Add support for GIT_CEILING_DIRSDavid Reiss, May 15, 2008
  2. Johannes SchindelinMay 15, 2008
  3. David ReissMay 15, 2008
  4. Add support for GIT_CEILING_DIRECTORIESJohannes Schindelin, May 15, 2008
  5. David ReissMay 15, 2008
  6. Johannes SchindelinMay 15, 2008
  7. David ReissMay 15, 2008
  8. Add support for GIT_CEILING_DIRECTORIESJohannes Schindelin, May 15, 2008
  9. Johannes SixtMay 16, 2008
  10. Johannes SchindelinMay 16, 2008
  11. Johannes SixtMay 16, 2008
  12. David ReissMay 16, 2008
  13. Johannes SchindelinMay 17, 2008
  14. Add support for GIT_CEILING_DIRECTORIESJohannes Schindelin, May 17, 2008
  15. Johannes SixtMay 19, 2008
  16. Johannes SchindelinMay 19, 2008
  17. Junio C HamanoMay 15, 2008
  18. Johannes SchindelinMay 15, 2008
  19. Johannes SixtMay 16, 2008
  20. Johannes SchindelinMay 16, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.