We use a different work-tree as usual when creatinng the repository.
Cloning the rep. does not save this setting. So we have to re-init the rep: git --git-dir=.git --work-tree=/ init
This commit is contained in:
parent
66511262e1
commit
326c6ea001
@ -82,9 +82,13 @@ clone_customer_repository () {
|
|||||||
then
|
then
|
||||||
$(exec_git_command git clone "$1")
|
$(exec_git_command git clone "$1")
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
CLONE_CUSTOMER_REPOSITORY=true
|
|
||||||
log_debug "$func:${LINENO} cloning ${1} done"
|
log_debug "$func:${LINENO} cloning ${1} done"
|
||||||
cd - ; return 0
|
local res=$(exec_git_command git --git-dir="${CUSTOMER_ID_BASE_DIR}/.git" --work-tree="/" init)
|
||||||
|
if ! [[ -z $res ]]; then
|
||||||
|
CLONE_CUSTOMER_REPOSITORY=true
|
||||||
|
log_debug "$func:${LINENO} re-init of ${1} done"
|
||||||
|
cd -; return 0
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
cd -
|
cd -
|
||||||
fi
|
fi
|
||||||
@ -111,6 +115,7 @@ clone_customer_repository () {
|
|||||||
cd_customer_repository () {
|
cd_customer_repository () {
|
||||||
local func="${FUNCNAME[0]}"
|
local func="${FUNCNAME[0]}"
|
||||||
# has to be called in WORKING_DIRECTORY
|
# has to be called in WORKING_DIRECTORY
|
||||||
|
cd "$WORKING_DIRECTORY"
|
||||||
if [ "$PWD" = "${WORKING_DIRECTORY}" ]; then
|
if [ "$PWD" = "${WORKING_DIRECTORY}" ]; then
|
||||||
repository_dir="./$WORKSPACE_DIR/$CUSTOMER_ID"
|
repository_dir="./$WORKSPACE_DIR/$CUSTOMER_ID"
|
||||||
if ! [[ -d "$repository_dir" ]]; then
|
if ! [[ -d "$repository_dir" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user