From fd88ecb6f715c1b48564c0227006037c0e890162 Mon Sep 17 00:00:00 2001 From: Konstantin Dmitriev Date: Nov 04 2016 06:42:22 +0000 Subject: Change the way how git updates fetched (should work for case if we fetch rewritten branch) --- diff --git a/docker-builder-data/build/script/include/inc-pkdownload-git.sh b/docker-builder-data/build/script/include/inc-pkdownload-git.sh index 8509100..152c4ce 100644 --- a/docker-builder-data/build/script/include/inc-pkdownload-git.sh +++ b/docker-builder-data/build/script/include/inc-pkdownload-git.sh @@ -6,9 +6,9 @@ pkdownload() { if [ -d "$DOWNLOAD_PACKET_DIR/$PK_DIRNAME/.git" ]; then cd "$DOWNLOAD_PACKET_DIR/$PK_DIRNAME" - if ! git pull; then - return 1 - fi + git fetch || return 1 + git stash || return 1 + git reset --hard origin/testing || return 1 else if ! git clone "$PK_URL" $PK_GIT_OPTIONS; then return 1