X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=all;h=df63f12ce74f9d2c7e3228e16354732e7f8013ac;hp=65ef59b95a1b8d2860c7faa726cd6ba4bc117149;hb=bc28716f920b6c365a834ea0de02962988245773;hpb=1b5a7dcd166338c876b078a83ecb47456110098b diff --git a/all b/all index 65ef59b9..df63f12c 100755 --- a/all +++ b/all @@ -203,8 +203,8 @@ fix_upstream_rebase() r_lc_together=`{ echo "$r_l_me"; echo "$r_l_other"; } | sort -u | wc -l` r_lc_same=$(($r_lc_me + $r_lc_other - $r_lc_together)) - if [ $(( $r_lc_same * 2 )) -le $(( $r_lc_me )) ] && [ $(( $r_lc_same * 2 )) -le $(( $r_lc_other )) ]; then - if yesno "Probable upstream rebase detected, automatically fix?" 'git log --oneline --graph --left-right "$r_l_other".."$r_l_me"'; then + if [ $(( $r_lc_same * 2 )) -gt $(( $r_lc_me )) ] || [ $(( $r_lc_same * 2 )) -gt $(( $r_lc_other )) ]; then + if yesno "Probable upstream rebase detected, automatically fix?" 'git log --oneline --graph --date-order --left-right "$r_other"..."$r_me"'; then git reset --hard "$r_me" git pull --rebase return 1