setup.c: detect $GIT_COMMON_DIR in is_git_directory()

If the file "$GIT_DIR/commondir" exists, it contains the value of
$GIT_COMMON_DIR.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2014-11-30 15:24:41 +07:00
committed by Junio C Hamano
parent 1d186b6f35
commit 4dc4e1457e
2 changed files with 44 additions and 6 deletions

View File

@ -240,6 +240,13 @@ shallow::
file is ignored if $GIT_COMMON_DIR is set and
"$GIT_COMMON_DIR/shallow" will be used instead.
commondir::
If this file exists, $GIT_COMMON_DIR (see linkgit:git[1]) will
be set to the path specified in this file if it is not
explicitly set. If the specified path is relative, it is
relative to $GIT_DIR. The repository with commondir is
incomplete without the repository pointed by "commondir".
modules::
Contains the git-repositories of the submodules. This
directory is ignored if $GIT_COMMON_DIR is set and