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