From 2bee50a083fbf549c3f062a2f89c6e636f532762 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sat, 3 Mar 2018 18:35:58 +0700 Subject: [PATCH] repository: delete ignore_env member MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- repository.c | 2 -- repository.h | 9 --------- 2 files changed, 11 deletions(-) diff --git a/repository.c b/repository.c index 04d85a2869..62f52f47fc 100644 --- a/repository.c +++ b/repository.c @@ -140,8 +140,6 @@ static int repo_init(struct repository *repo, struct repository_format format; memset(repo, 0, sizeof(*repo)); - repo->ignore_env = 1; - if (repo_init_gitdir(repo, gitdir)) goto error; diff --git a/repository.h b/repository.h index 2bfbf762f3..e7127baffb 100644 --- a/repository.h +++ b/repository.h @@ -75,15 +75,6 @@ struct repository { const struct git_hash_algo *hash_algo; /* Configurations */ - /* - * Bit used during initialization to indicate if repository state (like - * the location of the 'objectdir') should be read from the - * environment. By default this bit will be set at the begining of - * 'repo_init()' so that all repositories will ignore the environment. - * The exception to this is 'the_repository', which doesn't go through - * the normal 'repo_init()' process. - */ - unsigned ignore_env:1; /* Indicate if a repository has a different 'commondir' from 'gitdir' */ unsigned different_commondir:1; -- 2.43.2