зеркало из https://github.com/microsoft/git.git
git-sh-setup: move GIT_DIR initialization into a function
Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
9c66cd3bd0
Коммит
1c7e2d23e4
|
@ -330,8 +330,7 @@ esac
|
|||
|
||||
# Make sure we are in a valid repository of a vintage we understand,
|
||||
# if we require to be in a git repository.
|
||||
if test -z "$NONGIT_OK"
|
||||
then
|
||||
git_dir_init () {
|
||||
GIT_DIR=$(git rev-parse --git-dir) || exit
|
||||
if [ -z "$SUBDIRECTORY_OK" ]
|
||||
then
|
||||
|
@ -346,6 +345,11 @@ then
|
|||
exit 1
|
||||
}
|
||||
: ${GIT_OBJECT_DIRECTORY="$GIT_DIR/objects"}
|
||||
}
|
||||
|
||||
if test -z "$NONGIT_OK"
|
||||
then
|
||||
git_dir_init
|
||||
fi
|
||||
|
||||
peel_committish () {
|
||||
|
|
Загрузка…
Ссылка в новой задаче