Dothem: let distclean run before switching to another revision
We run "make distclean" when --scratch is in effect, but that should be done using the current Makefile and set of sources before flipping to another branch.
Junio C Hamano committed
Feb 19, 2020 at 14:50 UTC
9c6d54470785470ec0999c7aec4a64275d134604
1 file changed
+8
-7
Dothem
+8
-7
@@ -166,13 +166,6 @@ do
166
167
cd "$BUILDBASE/$branch"
168
git reset --hard &&
169
- case "$(git symbolic-ref HEAD)" in
170
- "refs/heads/$branch")
171
- : ;;
172
- *)
173
- git checkout "$branch" &&
174
- git reset --hard || exit
175
- esac &&
169
170
case "$scratch" in
171
'')
@@ -185,6 +178,14 @@ do
178
;;
179
esac &&
180
181
+ case "$(git symbolic-ref HEAD)" in
182
+ "refs/heads/$branch")
183
+ : ;;
184
+ *)
185
+ git checkout "$branch" &&
186
+ git reset --hard || exit
187
+ esac &&
188
+
189
case "$private" in
190
'')
191
;;