]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Meta/Dothem: add '--clean' option
authorJunio C Hamano <gitster@pobox.com>
Mon, 13 Mar 2023 16:51:26 +0000 (09:51 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Mar 2023 16:51:26 +0000 (09:51 -0700)
Dothem

diff --git a/Dothem b/Dothem
index 931af07d9cf4939a00bb304d831f574db5cbe374..6598da676b618111bbd1c1c26e4cf91cc3f7281f 100755 (executable)
--- a/Dothem
+++ b/Dothem
@@ -18,11 +18,12 @@ inst_prefix=$(
 )
 
 force= with_dash= test_long= M= install= doc= notest= bootstrap= branches= jobs=
-scratch= noprove= memtrash=--memtrash with_cocci= san=
+scratch= noprove= memtrash=--memtrash with_cocci= san= clean=
 while  case "$1" in
        --pedantic | --locale=* | --loose) M="$M $1" ;;
        --force) force=$1 ;;
        --dash) with_dash=y ;;
+       --clean) clean=y ;;
        --cocci) with_cocci=y ;;
        --no-cocci) with_cocci= ;;
        --long) test_long=--long ;;
@@ -192,13 +193,13 @@ do
                cd "$BUILDBASE/$branch"
                git reset --hard  &&
 
-               case "$scratch" in
+               case "$scratch$clean" in
                '')
                        ;;
-               y)
+               *y*)
                        saveMeta=$(readlink Meta)
                        Meta/Make distclean
-                       git clean -f -x
+                       git clean -f -x -d
                        ln -s "$saveMeta" Meta
                        ;;
                esac &&
@@ -211,6 +212,10 @@ do
                        git reset --hard || exit
                esac &&
 
+               case "$clean" in
+               y)      exit 0 ;;
+               esac &&
+
                case "$private" in
                '')
                        ;;