Code

setup: rework setup_explicit_git_dir()
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Fri, 26 Nov 2010 15:32:39 +0000 (22:32 +0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 Dec 2010 22:34:24 +0000 (14:34 -0800)
commitb3f66fd3e3abeb9183f33f023727e3a53868849d
tree39a1f3ef69e1d2cd6e614f1e2ff96070973de739
parent9951d3b37ec7298384640b11d07a990ef031fe83
setup: rework setup_explicit_git_dir()

This function is the most complex one among the three setup_*
functions because all GIT_DIR, GIT_WORK_TREE, core.worktree and
core.bare are involved.

Because core.worktree is only effective inside
setup_explicit_git_dir() and the extra code in setup_git_directory()
is to handle that. The extra code can now be retired.

Also note that setup_explicit assignment is removed, worktree setting
is no longer decided by get_git_work_tree(). get_git_work_tree() will
be simplified in the next commit.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
setup.c
t/t1510-repo-setup.sh