X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=all;h=71758f14a16ab9462f7c402c9b7340b1ca9b6a7f;hb=659839d23257f4c01d96ac5d7a8f4a7b9d9909a7;hp=cc26e5be4dcd64b745e4095638290194e3a1e3fb;hpb=dadfae231790d4233733f7c942873d5ec21bccb9;p=xonotic%2Fxonotic.git diff --git a/all b/all index cc26e5be..71758f14 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