sha1_file.c: move delayed getenv(altdb) back to setup_git_env()
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sat, 3 Mar 2018 11:35:57 +0000 (18:35 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Mar 2018 19:14:03 +0000 (11:14 -0800)
commit7bc0dcaa6120efec8cf8caef8511c09d35dbcf09
treea5aebaf563a84a28783059b5aae03caa4fafeece
parent0ac5af59957cc46641a6083207c9a04c1a9fa9c8
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>
environment.c
repository.c
repository.h
sha1_file.c