X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=all;h=0020c6c2351a136cc966bc072654b78ab486de09;hp=4df3b9a1179b8f8c647aca7a32dbccb22d59b04c;hb=fff4cea967c2434ba123a7660add58fdf337ecf0;hpb=5065d9479104ea447dcd45e04e732ed167c15af0 diff --git a/all b/all index 4df3b9a1..0020c6c2 100755 --- a/all +++ b/all @@ -1,4 +1,5 @@ #!/bin/sh +# vim: filetype=zsh set -e @@ -156,6 +157,9 @@ case "$cmd" in verbose git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" # TODO remove this line later + git config core.autocrlf input + git config core.safecrlf true + r=`git symbolic-ref HEAD` r=${r#refs/heads/} if git config branch.$r.remote >/dev/null 2>&1; then @@ -293,6 +297,7 @@ case "$cmd" in done ;; push|commit) + submit=$1 for d in $repos; do dv=`visible_repo_name "$d"` enter "$d0/$d" verbose @@ -309,16 +314,24 @@ case "$cmd" in verbose git commit -a fi fi - if git log "origin/$r".."$r" | grep .; then + rem=`git config "branch.$r.remote" || echo origin` + if git log "$rem/$r".."$r" | grep .; then a= while [ x"$a" != x"y" -a x"$a" != x"n" ]; do echo "Push \"$r\" in $dv?" read -r a done if [ x"$a" = x"y" ]; then - verbose git push `git config "branch.$r.remote" || echo origin` HEAD + verbose git push "$rem" HEAD fi fi + if [ x"$submit" = x"-s" ]; then + case "$r" in + */*) + verbose git push "$rem" HEAD:"${r%%/*}/finished/${r#*/}" + ;; + esac + fi cd "$d0" done ;; @@ -435,7 +448,7 @@ case "$cmd" in echo "Usage:" echo " $SELF pull" echo " $SELF merge" - echo " $SELF push" + echo " $SELF push [-s]" echo " $SELF branches" echo " $SELF branch [] " echo " $SELF branch "