]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Dothem: let distclean run before switching to another revision
authorJunio C Hamano <gitster@pobox.com>
Wed, 19 Feb 2020 22:50:16 +0000 (14:50 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 19 Feb 2020 22:50:16 +0000 (14:50 -0800)
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.

Dothem

diff --git a/Dothem b/Dothem
index ce467d74177e1cd72b6ba5fe1282ea60a16900a0..b429ff740367c93a90cdfd859e25e8a4615b0254 100755 (executable)
--- 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
                '')
                        ;;