diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-03-03 12:35:57 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-05 20:14:03 +0100 |
commit | 7bc0dcaa6120efec8cf8caef8511c09d35dbcf09 (patch) | |
tree | a5aebaf563a84a28783059b5aae03caa4fafeece /repository.h | |
parent | repository.c: delete dead functions (diff) | |
download | git-7bc0dcaa6120efec8cf8caef8511c09d35dbcf09.tar.xz git-7bc0dcaa6120efec8cf8caef8511c09d35dbcf09.zip |
sha1_file.c: move delayed getenv(altdb) back to setup_git_env()
getenv() is supposed to work on the main repository only. This delayed
getenv() code in sha1_file.c makes it more difficult to convert
sha1_file.c to a generic object store that could be used by both
submodule and main repositories.
Move the getenv() back in setup_git_env() where other env vars are
also fetched.
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 'repository.h')
-rw-r--r-- | repository.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/repository.h b/repository.h index 84aeac2825..2bfbf762f3 100644 --- a/repository.h +++ b/repository.h @@ -26,6 +26,9 @@ struct repository { */ char *objectdir; + /* Path to extra alternate object database if not NULL */ + char *alternate_db; + /* * Path to the repository's graft file. * Cannot be NULL after initialization. @@ -93,6 +96,7 @@ struct set_gitdir_args { const char *object_dir; const char *graft_file; const char *index_file; + const char *alternate_db; }; extern void repo_set_gitdir(struct repository *repo, |