An aliased command spawned from a bare repository that does not say
it is bare with "core.bare = yes" is treated as non-bare by mistake.
* jk/alias-in-bare:
setup: suppress implicit "." work-tree for bare repos
environment: add GIT_PREFIX to local_repo_env
cache.h: drop LOCAL_REPO_ENV_SIZE
@ -125,6 +125,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
@@ -125,6 +125,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
else if (!git_env_bool(GIT_IMPLICIT_WORK_TREE_ENVIRONMENT, 1)) {
/* #16d */
set_git_dir(gitdirenv);
free(gitfile);
return NULL;
}
else /* #2, #10 */
set_git_work_tree(".");
@ -603,6 +609,8 @@ static const char *setup_bare_git_dir(char *cwd, int offset, int len, int *nongi
@@ -603,6 +609,8 @@ static const char *setup_bare_git_dir(char *cwd, int offset, int len, int *nongi
if (check_repository_format_gently(".", nongit_ok))
@ -517,6 +517,25 @@ test_expect_success '#16c: bare .git has no worktree' '
@@ -517,6 +517,25 @@ test_expect_success '#16c: bare .git has no worktree' '