Browse Source

Use a more resilient "checkout ref" one-liner

Tianon Gravi 11 years ago
parent
commit
21f3f86b86
1 changed files with 1 additions and 1 deletions
  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