Re: [PATCH 3/3] setup: always honor GIT_WORK_TREE and core.worktree
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jan 19, 2011, 19:03 UTC
- Message-ID
- <20110119190304.GA30618@burratino>
- In-Reply-To
- <20110119124230.GD23222@burratino>
Jonathan Nieder wrote:
Show 12 quoted lines
> --- a/setup.c
> +++ b/setup.c
> @@ -509,8 +532,10 @@ static const char *setup_git_directory_gently_1(int *nongit_ok)
> * validation.
> */
> gitdirenv = getenv(GIT_DIR_ENVIRONMENT);
> - if (gitdirenv)
> + if (gitdirenv) {
> + trace_printf("trace: gitdirenv = %s\n", gitdirenv);
> return setup_explicit_git_dir(gitdirenv, cwd, len, nongit_ok);
> + }
> The above hunk is a debugging remnant. I suppose it was foolish to send out the series so late. Probably not such a big deal since the problem Maaartin mentioned remains anyway (that is, the warning is still confusing).
-- 8< -- Subject: fixup! setup: always honor GIT_WORK_TREE and core.worktree
Remove noisy debug code.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> ---
diff --git b/setup.c a/setup.c index c0f5846..e08cdf2 100644 --- b/setup.c +++ a/setup.c @@ -532,10 +532,8 @@ static const char *setup_git_directory_gently_1(int *nongit_ok) * validation. */ gitdirenv = getenv(GIT_DIR_ENVIRONMENT); - if (gitdirenv) { - trace_printf("trace: gitdirenv = %s\n", gitdirenv); + if (gitdirenv) return setup_explicit_git_dir(gitdirenv, cwd, len, nongit_ok); - } ceil_offset = longest_ancestor_length(cwd, env_ceiling_dirs); if (ceil_offset < 0 && has_dos_drive_prefix(cwd))