From: Junio C Hamano Date: Wed, 19 Feb 2020 22:50:16 +0000 (-0800) Subject: Dothem: let distclean run before switching to another revision X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c6d54470785470ec0999c7aec4a64275d134604;p=thirdparty%2Fgit.git 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. --- diff --git a/Dothem b/Dothem 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 '') ;;