repository: delete ignore_env member
This variable was added because the repo_set_gitdir() was created to cover both submodule and main repos, but these two are initialized a bit differently so ignore_env == 0 means main repo, while ignore_env != 0 is submodules. Since the difference part (env variables) has been moved out of repo_set_gitdir(), this function works the same way for both repo types and ignore_env is not needed anymore. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Mar 3, 2018 at 18:35 UTC
2bee50a083fbf549c3f062a2f89c6e636f532762
2 files changed
-11
repository.c
-2
@@ -140,8 +140,6 @@ static int repo_init(struct repository *repo,
140
struct repository_format format;
141
memset(repo, 0, sizeof(*repo));
142
143
- repo->ignore_env = 1;
144
-
143
if (repo_init_gitdir(repo, gitdir))
144
goto error;
145
repository.h
-9
@@ -75,15 +75,6 @@ struct repository {
75
const struct git_hash_algo *hash_algo;
76
77
/* Configurations */
78
- /*
79
- * Bit used during initialization to indicate if repository state (like
80
- * the location of the 'objectdir') should be read from the
81
- * environment. By default this bit will be set at the begining of
82
- * 'repo_init()' so that all repositories will ignore the environment.
83
- * The exception to this is 'the_repository', which doesn't go through
84
- * the normal 'repo_init()' process.
85
- */
86
- unsigned ignore_env:1;
78
79
/* Indicate if a repository has a different 'commondir' from 'gitdir' */
80
unsigned different_commondir:1;