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

Re: [PATCH 2/2] Add support for GIT_CEILING_DIRS

From
Johannes Sixt <j.sixt@viscovery.net>
Date
May 14, 2008, 10:23 UTC
Message-ID
<482ABD88.30103@viscovery.net>
In-Reply-To
<alpine.DEB.1.00.0805140903560.30431@racer>
Johannes Schindelin schrieb:
Show 18 quoted lines
> On Tue, 13 May 2008, David Reiss wrote:
>> diff --git a/setup.c b/setup.c
>> index c54f2b6..d7d986c 100644
>> --- a/setup.c
>> +++ b/setup.c
>> @@ -359,10 +359,11 @@ const char *read_gitfile_gently(const char *path)
>>  const char *setup_git_directory_gently(int *nongit_ok)
>>  {
>>  	const char *work_tree_env = getenv(GIT_WORK_TREE_ENVIRONMENT);
>> +	const char *env_ceiling_dirs = getenv(CEILING_DIRS_ENVIRONMENT);
>>  	static char cwd[PATH_MAX+1];
>>  	const char *gitdirenv;
>>  	const char *gitfile_dir;
>> -	int len, offset;
>> +	int len, offset, min_offset = -1;
> 
> AFAIR we have min_offset in the mingw branch, too, but I think it is 
> initialized to 0.

Yes, indeed, and even for much the same purpose (i.e. to stop before the beginning of the path is reached - on Windows we don't want to look at "C:" prefixes). Please look at this commit:

http://repo.or.cz/w/git/mingw/j6t.git?a=commitdiff;h=4ab30965f520bd444f3eefe1dee4622181933f90
-- Hannes
Previous: Johannes SchindelinNext: Kevin Ballard
Message 3 of 6 in “Add support for GIT_CEILING_DIRS”
  1. 2/2 Add support for GIT_CEILING_DIRSDavid Reiss, May 14, 2008
  2. Johannes SchindelinMay 14, 2008
  3. Johannes SixtMay 14, 2008
  4. Kevin BallardMay 14, 2008
  5. Johannes SchindelinMay 14, 2008
  6. Kevin BallardMay 14, 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.