summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-03-03 18:35:55 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-03-05 11:14:03 -0800
commit357a03ebe9e04329705a46ff36d526c5ab0c3ebc (patch)
treec95809c925390ceae12fa925af722576c5675afe /cache.h
parentrepository: initialize the_repository in main() (diff)
downloadtgif-357a03ebe9e04329705a46ff36d526c5ab0c3ebc.tar.xz
repository.c: move env-related setup code back to environment.c
It does not make sense that generic repository code contains handling of environment variables, which are specific for the main repository only. Refactor repo_set_gitdir() function to take $GIT_DIR and optionally _all_ other customizable paths. These optional paths can be NULL and will be calculated according to the default directory layout. Note that some dead functions are left behind to reduce diff noise. They will be deleted in the next patch. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 9cac7bb518..41ba67cc16 100644
--- a/cache.h
+++ b/cache.h
@@ -484,7 +484,7 @@ static inline enum object_type object_type(unsigned int mode)
*/
extern const char * const local_repo_env[];
-extern void setup_git_env(void);
+extern void setup_git_env(const char *git_dir);
/*
* Returns true iff we have a configured git repository (either via