After clone: fetch the reposiry again, follwed by a git reset --hard.
The effect is that git crates all diretories and files in /etc and /opt.
This commit is contained in:
parent
52271bef21
commit
8b5cda7f73
12
git_helpers
12
git_helpers
@ -89,8 +89,17 @@ clone_customer_repository () {
|
||||
if cd ${CUSTOMER_ID_BASE_DIR}; then
|
||||
# local res=$(exec_git_command git --git-dir=.git --work-tree=/ init)
|
||||
exec_git_command git checkout "$LOCAL_BRANCH"
|
||||
if [[ $? -eq 0 ]]; then
|
||||
log_debug "$func:${LINENO} checked out local branch $LOCAL_BRANCH"
|
||||
exec_git_command git config core.worktree "/"
|
||||
if [[ $? -eq 0 ]]; then
|
||||
log_debug "$func:${LINENO} configured worktree"
|
||||
exec_git_command git fetch --all
|
||||
if [[ $? -eq 0 ]]; then
|
||||
log_debug "$func:${LINENO} fetch repository"
|
||||
exec_git_command git reset --hard "$LOCAL_BRANCH"
|
||||
if [[ $? -eq 0 ]]; then
|
||||
log_debug "$func:${LINENO} reset --hard $LOCAL_BRANCH"
|
||||
# re-initialized. copy post-merge (a hook called
|
||||
# when 'git pull' is executed and changed data
|
||||
# are received).
|
||||
@ -103,6 +112,9 @@ clone_customer_repository () {
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
cd_home; return 1
|
||||
fi
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user