X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=all;h=bba700ae8f0d319b2fcdb465d234baf08a319bc9;hp=cc26e5be4dcd64b745e4095638290194e3a1e3fb;hb=df6c8dfa67c58ed99fd4847551c6a22d61137b78;hpb=dadfae231790d4233733f7c942873d5ec21bccb9 diff --git a/all b/all index cc26e5be..bba700ae 100755 --- a/all +++ b/all @@ -391,9 +391,10 @@ case "$cmd" in enter "$d0/$d" verbose r=`git symbolic-ref HEAD` r=${r#refs/heads/} - if git diff HEAD | grep .; then + diffdata=`git diff --color HEAD` + if [ -n "$diffdata" ]; then # we have uncommitted changes - if yesno "Uncommitted changes in \"$r\" in $dv. Commit?"; then + if yesno "Uncommitted changes in \"$r\" in $dv. Commit?" 'echo "$diffdata" | less -r'; then verbose git commit -a fi fi @@ -401,10 +402,11 @@ case "$cmd" in bra=`git config "branch.$r.merge" || echo "$r"` upstream="$rem/$bra" if ! git rev-parse "$upstream" >/dev/null 2>&1; then - upstream="`repobranch "$d"`" + upstream="origin/`repobranch "$d"`" fi - if git log "$upstream".."$r" | grep .; then - if yesno "Push \"$r\" in $dv?"; then + logdata=`git log --color "$upstream".."$r"` + if [ -n "$logdata" ]; then + if yesno "Push \"$r\" in $dv?" 'echo "$logdata" | less -r'; then verbose git push "$rem" HEAD fi fi @@ -615,29 +617,7 @@ case "$cmd" in rm -rf "$patchdir" ;; admin-merge) - if [ "$#" = 1 ]; then - set -- "${1%%/*}" "${1#*/}" - fi - for d in $repos; do - enter "$d0/$d" verbose - git rev-parse "$1/$2" || continue - # 1. review - { - git log HEAD.."$1/$2" - git diff HEAD..."$1/$2" - } | less - if yesno "Merge \"$1/$2\" into `git symbolic-ref HEAD` of $d?"; then - git merge "$1/$2" - if "$SELF" compile && yesno "Still merge \"$1/$2\" into `git symbolic-ref HEAD` of $d? Maybe you want to test first."; then - git push origin HEAD - git push "$1" :"$2" - else - git reset --hard HEAD@{1} - fi - fi - done - ;; - admin-merge-2) + branch=$1 t=`mktemp` report="" reportecho() @@ -668,6 +648,11 @@ case "$cmd" in continue ;; esac + if [ -n "$branch" ]; then + if [ x"$branch" != x"${ref#refs/remotes/origin/}" ]; then + continue + fi + fi reportecho " Branch $ref:" note=`GIT_NOTES_REF=refs/notes/admin-merge git notes show "$ref" 2>/dev/null || true` logdata=`git log --color "$base".."$ref"`