Parcourir la source

Tweak mfpub stashing

Scott Lahteine il y a 4 ans
Parent
révision
0eae26a7be
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2
    2
      buildroot/share/git/mfpub

+ 2
- 2
buildroot/share/git/mfpub Voir le fichier

33
 # Check out the named branch (or stay in current)
33
 # Check out the named branch (or stay in current)
34
 
34
 
35
 if [[ $BRANCH != $CURR ]]; then
35
 if [[ $BRANCH != $CURR ]]; then
36
-  git checkout $BRANCH
37
   echo "Stashing any changes to files..."
36
   echo "Stashing any changes to files..."
38
   [[ $(git stash) != "No local "* ]] && HAS_STASH=1
37
   [[ $(git stash) != "No local "* ]] && HAS_STASH=1
38
+  git checkout $BRANCH
39
 fi
39
 fi
40
 
40
 
41
 COMMIT=$( git log --format="%H" -n 1 )
41
 COMMIT=$( git log --format="%H" -n 1 )
135
 rm -rf ${TMPFOLDER}
135
 rm -rf ${TMPFOLDER}
136
 
136
 
137
 # Go back to the branch we started from
137
 # Go back to the branch we started from
138
-[[ $BRANCH != $CURR ]] && { git checkout $BRANCH ; [[ $HAS_STASH == 1 ]] && git stash pop ; }
138
+[[ $BRANCH != $CURR ]] && git checkout $BRANCH && [[ $HAS_STASH == 1 ]] && git stash pop

Chargement…
Annuler
Enregistrer