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
index ce467d7417..b429ff7403 100755
--- a/Dothem
+++ b/Dothem
@@ -166,13 +166,6 @@ do
cd "$BUILDBASE/$branch"
git reset --hard &&
- case "$(git symbolic-ref HEAD)" in
- "refs/heads/$branch")
- : ;;
- *)
- git checkout "$branch" &&
- git reset --hard || exit
- esac &&
case "$scratch" in
'')
@@ -185,6 +178,14 @@ do
;;
esac &&
+ case "$(git symbolic-ref HEAD)" in
+ "refs/heads/$branch")
+ : ;;
+ *)
+ git checkout "$branch" &&
+ git reset --hard || exit
+ esac &&
+
case "$private" in
'')
;;