summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-03-25 14:00:44 -0700
committerJunio C Hamano <gitster@pobox.com>2013-03-25 14:00:44 -0700
commitfb3b7b1f95ce3c39f1116ebabf0bbcbfd3bb8796 (patch)
treea56b7339ad8c0877ee6d6fae25dba8caf58c8518 /git.c
parent55f6fbef3d3910fbc5de87f81e8e8e882d3d1d38 (diff)
parent2cd83d10bb6bcf768129e1c4e5a4dee4b6bcd27f (diff)
downloadgit-fb3b7b1f95ce3c39f1116ebabf0bbcbfd3bb8796.tar.gz
Merge branch 'jk/alias-in-bare'
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
Diffstat (limited to 'git.c')
-rw-r--r--git.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/git.c b/git.c
index 39ba6b1461..850d3f5527 100644
--- a/git.c
+++ b/git.c
@@ -125,6 +125,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
static char git_dir[PATH_MAX+1];
is_bare_repository_cfg = 1;
setenv(GIT_DIR_ENVIRONMENT, getcwd(git_dir, sizeof(git_dir)), 0);
+ setenv(GIT_IMPLICIT_WORK_TREE_ENVIRONMENT, "0", 1);
if (envchanged)
*envchanged = 1;
} else if (!strcmp(cmd, "-c")) {