X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=all;h=1d85b6e24d457ca0fe6e96f7fbc57c7bdb50ee0a;hp=57d92453a1d1e89e0536081087b16d696a34bdef;hb=2c4a7b5e92111ed1576757a6dd5674575f31e616;hpb=0a079af1661b84bb6d52e06253b3de8f164ac0eb diff --git a/all b/all index 57d92453..1d85b6e2 100755 --- a/all +++ b/all @@ -1,4 +1,5 @@ #!/bin/sh +# vim: filetype=zsh set -e @@ -153,7 +154,11 @@ case "$cmd" in fi ;; esac - verbose git config remote.origin.fetch "refs/heads/*:refs/remotes/origin/*" + verbose git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" + # TODO remove this line later + + verbose git config core.autocrlf input + verbose git config core.safecrlf true r=`git symbolic-ref HEAD` r=${r#refs/heads/} @@ -292,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 @@ -308,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 ;; @@ -434,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 "