[BUGFIX] Git repository is not clean after branch switch 61/41961/2
authorXavier Perseguers <xavier@typo3.org>
Sat, 25 Jul 2015 23:16:34 +0000 (01:16 +0200)
committerXavier Perseguers <xavier@typo3.org>
Sat, 25 Jul 2015 23:39:23 +0000 (01:39 +0200)
Change-Id: Id90795cc925a0410c73b43b5f09fc3af73f2d238
Reviewed-on: http://review.typo3.org/41961
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>
typo3/files/scripts/bin/update-typo3-core-template

index fb26043..2fa1f0f 100755 (executable)
@@ -35,9 +35,9 @@ fi
 # Update TYPO3 sources
 echo "[INFO]    Fetching latest changes from TYPO3 CMS sources"
 pushd ${SOURCES} >/dev/null
+git fetch >/dev/null 2>&1
 git checkout master >/dev/null 2>&1
 git reset --hard origin/master >/dev/null 2>&1
-git fetch >/dev/null 2>&1
 popd >/dev/null
 
 BRANCHES_INDEXES=( ${!TYPO3_BRANCHES[@]} )
@@ -50,7 +50,7 @@ for VERSION in ${VERSIONS}; do
        echo "[INFO]    ------------------------------------------------------"
        pushd ${SOURCES} >/dev/null
        git checkout ${TYPO3_BRANCHES[$VERSION]} >/dev/null 2>&1
-       git pull >/dev/null 2>&1
+       git reset --hard origin/${TYPO3_BRANCHES[$VERSION]} >/dev/null 2>&1
        popd >/dev/null
 
        GLOBAL_MAPPING=${POOTLE_PO}/.typo3/${VERSION}.filemapping