Skip to content

Commit 2bee50a

Browse files
pcloudsgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7bc0dca commit 2bee50a

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

repository.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@ static int repo_init(struct repository *repo,
140140
struct repository_format format;
141141
memset(repo, 0, sizeof(*repo));
142142

143-
repo->ignore_env = 1;
144-
145143
if (repo_init_gitdir(repo, gitdir))
146144
goto error;
147145

repository.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,6 @@ struct repository {
7575
const struct git_hash_algo *hash_algo;
7676

7777
/* 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;
8778

8879
/* Indicate if a repository has a different 'commondir' from 'gitdir' */
8980
unsigned different_commondir:1;

0 commit comments

Comments
 (0)