X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=all;h=7ec02158e7c99a8461c4c13ecb8d3a79a4cb51f3;hb=f49f350f054e8a7d86765239e2b2a2337c2da9e7;hp=3b288454c901e1bad9821817b5448543a38b17f8;hpb=edb422c26e7f44d6e0c295078f4dc63d62832ad2;p=xonotic%2Fxonotic.git diff --git a/all b/all index 3b288454..7ec02158 100755 --- a/all +++ b/all @@ -391,20 +391,22 @@ 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 rem=`git config "branch.$r.remote" || echo origin` bra=`git config "branch.$r.merge" || echo "$r"` upstream="$rem/$bra" - if ! [ git rev-parse "$upstream" ]; then + if ! git rev-parse "$upstream" >/dev/null 2>&1; then upstream="`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