Set GIT_CLONE_EXECUTED to show that git clone was run

This commit is contained in:
Gerhard Hoffmann 2022-06-12 13:10:16 +02:00
parent 0541206033
commit 6f8ba186dd

View File

@ -81,12 +81,14 @@ clone_customer_repository () {
$(exec_git_command git clone "$1") $(exec_git_command git clone "$1")
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
log_debug "$func:${LINENO} cloning ${1} done" log_debug "$func:${LINENO} cloning ${1} done"
GIT_CLONE_EXECUTED=1
# after cloning, cd into repository, and re-initialize, # after cloning, cd into repository, and re-initialize,
# setting the work-tree as "/". This has the effect that # setting the work-tree as "/". This has the effect that
# a "git pull" will automatically fetched files in the # a "git pull" will automatically fetched files in the
# corresponding sytem-folders. # corresponding sytem-folders.
if cd ${CUSTOMER_ID_BASE_DIR}; then if cd ${CUSTOMER_ID_BASE_DIR}; then
# local res=$(exec_git_command git --git-dir=.git --work-tree=/ init) # local res=$(exec_git_command git --git-dir=.git --work-tree=/ init)
exec_git_command git checkout "$LOCAL_BRANCH"
exec_git_command git config core.worktree "/" exec_git_command git config core.worktree "/"
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
# re-initialized. copy post-merge (a hook called # re-initialized. copy post-merge (a hook called