X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=all;h=764fb4302372aa6d0324d24ba41ef38074803ebf;hp=12e4501f82fd92aabf5797b47691342d80b9271b;hb=2a67f42c77264b251eadef2129bc4ea2f24a1ac6;hpb=20c8db330f295eeec19b7fb4a63153618b8213c2 diff --git a/all b/all index 12e4501f..764fb430 100755 --- a/all +++ b/all @@ -895,15 +895,18 @@ case "$cmd" in clean) force=false gotoupstream=false + fetchupstream=false gotomaster=false rmuntracked=false killbranches=false # usage: - # ./all clean [-m] [-f | -fu] [-r] [-D] + # ./all clean [-m] [-f | -fu | -fU] [-r] [-D] # ./all clean --reclone + found=false while :; do if [ x"$1" = x"--reclone" ]; then force=true + fetchupstream=true gotoupstream=true gotomaster=true rmuntracked=true @@ -912,9 +915,16 @@ case "$cmd" in force=true elif [ x"$1" = x"-u" ]; then gotoupstream=true + elif [ x"$1" = x"-U" ]; then + gotoupstream=true + fetchupstream=true elif [ x"$1" = x"-fu" ]; then force=true gotoupstream=true + elif [ x"$1" = x"-Fu" ]; then + force=true + gotoupstream=true + fetchupstream=true elif [ x"$1" = x"-m" ]; then gotomaster=true elif [ x"$1" = x"-r" ]; then @@ -924,8 +934,12 @@ case "$cmd" in else break fi + found=true shift done + if ! $found; then + rmuntracked=true + fi for d in $repos; do verbose cd "$d0/$d" if $gotoupstream; then @@ -934,6 +948,9 @@ case "$cmd" in exit 1 fi if $gotomaster; then + if $fetchupstream; then + verbose git fetch origin + fi verbose git checkout -f "`repobranch "$d"`" verbose git reset --hard origin/"`repobranch "$d"`" else @@ -942,6 +959,9 @@ case "$cmd" in rem=`git config "branch.$r.remote" || echo origin` bra=`git config "branch.$r.merge" || echo "$r"` upstream="$rem/${bra#refs/heads/}" + if $fetchupstream; then + verbose git fetch "$rem" + fi if ! git rev-parse "$upstream" >/dev/null 2>&1; then upstream="origin/`repobranch "$d"`" fi @@ -1363,15 +1383,24 @@ case "$cmd" in *) echo "Usage:" - echo " $SELF pull" - echo " $SELF merge" - echo " $SELF push [-s]" + echo " $SELF admin-merge []" + echo " $SELF branch " + echo " $SELF branch []" echo " $SELF branches" - echo " $SELF branch [] " - echo " $SELF branch " - echo " $SELF checkout [] " - echo " $SELF compile [-c|-n] [] " - echo " $SELF run [] " - echo " $SELF each " + echo " $SELF checkout|switch " + echo " $SELF checkout|switch /" + echo " $SELF clean [-m] [-f | -fu | -fU] [-r] [-D]" + echo " $SELF clean --reclone" + echo " $SELF compile [-c]" + echo " $SELF each|foreach [-k] command..." + echo " $SELF fix_upstream_rebase" + echo " $SELF merge" + echo " $SELF push|commit [-s]" + echo " $SELF release" + echo " $SELF restore-patches" + echo " $SELF run [sdl|glx|wgl|agl|dedicated] options..." + echo " $SELF save-patches" + echo " $SELF update-maps" + echo " $SELF update|pull [-N]" ;; esac