Make setup_git_env() resolve .git file when $GIT_DIR is not specified
commit487a2b732230608fe7f2cdc46c9f11bd646cb1ac
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sat, 31 Aug 2013 01:04:14 +0000 (31 08:04 +0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Sep 2013 18:14:58 +0000 (3 11:14 -0700)
treeed1d7d7dd69c2338d686b0c610171090c9e402bc
parenta3bc3d070cacf07dbe11b4bfec57554c8bbf1957
Make setup_git_env() resolve .git file when $GIT_DIR is not specified

This makes reinitializing on a .git file repository work.

This is probably the only case that setup_git_env() (via
set_git_dir()) is called on a .git file. Other cases in
setup_git_dir_gently() and enter_repo() both cover .git file case
explicitly because they need to verify the target repo is valid.

Reported-by: Ximin Luo <infinity0@gmx.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
environment.c
t/t0001-init.sh