X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=all;h=4e0e9460b1ad9133921afe5551690d1f196822fa;hp=5e17c0b7514dfe8512b6ae670fb09b53a9ac09b8;hb=2a8628fbe7b9c13fab9bf353af09311ffc156bcb;hpb=2afddf00417d92245f1fdbc2ed382bb5422e44bd diff --git a/all b/all index 5e17c0b7..4e0e9460 100755 --- a/all +++ b/all @@ -18,7 +18,7 @@ SELF="$d0/all" case "$0" in all|*/all) case "`uname`" in - MINGW*) + MINGW*|Win*) # Windows hates users. So this script has to copy itself elsewhere first... tname= cp "$SELF" ../all.xonotic.sh @@ -153,12 +153,19 @@ case "$cmd" in fi ;; esac - if ! verbose git pull; then - check_mergeconflict "$d" - # do not exit, as this may also mean we are tracking something else + verbose git config remote.origin.fetch "refs/heads/*:refs/remotes/origin/*" + + r=`git symbolic-ref HEAD` + r=${r#refs/heads/} + if git config branch.$r.remote >/dev/null 2>&1; then + if ! verbose git pull; then + check_mergeconflict "$d" + exit 1 # FATAL + fi fi + cd "$d00" - checkself "$@" + checkself "$cmd" "$@" cd "$d0/$d" verbose git remote prune origin cd "$d0" @@ -187,7 +194,7 @@ case "$cmd" in verbose git checkout master fi cd "$d00" - checkself "$@" + checkself "$cmd" "$@" cd "$d0" done if ! $exists; then @@ -198,10 +205,14 @@ case "$cmd" in branch) remote=$1 branch=$2 + srcbranch=$3 if [ -z "$branch" ]; then branch=$remote remote=origin fi + if [ -z "$srcbranch" ]; then + srcbranch=master + fi if [ -z "$branch" ]; then for d in $repos; do enter "$d0/$d" @@ -220,7 +231,7 @@ case "$cmd" in read -r a done if [ x"$a" = x"y" ]; then - verbose git push "$remote" HEAD:"$branch" + verbose git push "$remote" "$srcbranch":"$branch" verbose git checkout --track -b "$branch" "$remote/$branch" fi cd "$d0" @@ -259,7 +270,7 @@ case "$cmd" in cd "$d0" done ;; - push) + push|commit) for d in $repos; do dv=`visible_repo_name "$d"` enter "$d0/$d" @@ -344,6 +355,7 @@ case "$cmd" in echo " $SELF push" echo " $SELF branches" echo " $SELF branch [] " + echo " $SELF branch " echo " $SELF checkout [] " echo " $SELF compile" echo " $SELF run "