Update switch_all_submodules_to_head_and_clean

+ cleaning of temporary branches combined into one operation along with pull
+ this prevents additional communication with the remote server
+ all remote servers will be fetched and also pruned

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/2/head
Slávek Banko 6 years ago
parent f50efa7e80
commit 9bb83bf90c
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -67,12 +67,11 @@ updateModule() {
git clean -dxff git clean -dxff
fi fi
git checkout $branch git checkout $branch
git pull --rebase $GIT_NO_RECURSE_SUBMODULES git pull --rebase --all --prune $GIT_NO_RECURSE_SUBMODULES
if [[ ! -z "`git status --porcelain $GIT_IGNORE_SUBMODULES`" ]]; then if [[ ! -z "`git status --porcelain $GIT_IGNORE_SUBMODULES`" ]]; then
git reset --hard HEAD git reset --hard HEAD
git clean -dxff git clean -dxff
fi fi
git remote prune origin
if [[ -e $PARENTDIR/$MODULE.gitmodules ]]; then if [[ -e $PARENTDIR/$MODULE.gitmodules ]]; then
if [[ $gituser == "anonymous" ]]; then if [[ $gituser == "anonymous" ]]; then

Loading…
Cancel
Save