Pārlūkot izejas kodu

Use a more resilient "checkout ref" one-liner

Tianon Gravi 11 gadi atpakaļ
vecāks
revīzija
21f3f86b86
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      bashbrew/build.sh

+ 1 - 1
bashbrew/build.sh

@@ -209,7 +209,7 @@ while [ "$#" -gt 0 ]; do
 		continue
 	fi
 	
-	( set -x; cd "$gitRepo" && git clean -dfxq && git checkout -q "$gitRef" ) &>> "$thisLog"
+	( set -x; cd "$gitRepo" && git reset -q HEAD && git checkout -q -- . && git clean -dfxq && git checkout -q "$gitRef" -- ) &>> "$thisLog"
 	# TODO git tag
 	
 	if [ ! -d "$gitRepo/$gitDir" ]; then