]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - all
add "commit" as alias to push in the ./all script
[xonotic/xonotic.git] / all
diff --git a/all b/all
index c94d71b36be26690535cbbf9a8626a25694da14b..4e0e9460b1ad9133921afe5551690d1f196822fa 100755 (executable)
--- 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,10 +153,17 @@ 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 "$cmd" "$@"
                                cd "$d0/$d"
@@ -263,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"