]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - all
fix name typo
[xonotic/xonotic.git] / all
diff --git a/all b/all
index 14d2eeb602bf4c258ad9063ceb48bb4f024d61ba..6afd6dff9de8ef33a0113815cff93fa33e521b11 100755 (executable)
--- a/all
+++ b/all
@@ -117,7 +117,7 @@ data/xonotic-nexcompat.pk3dir |
 mediasource                   |                                                   | master      |
 darkplaces                    |                                                   | div0-stable | svn
 fteqcc                        | git://github.com/Blub/qclib.git                   | master      |
-div0-gittools                 | git://git.icculus.org/divverent/div0-gittools.git | master      |
+div0-gittools                 |                                                   | master      |
 netradiant                    |                                                   | master      |
 "
 # todo: in darkplaces, change repobranch to div0-stable
@@ -194,8 +194,8 @@ fix_upstream_rebase()
        # no merge-base? upstream did filter-branch
        if [ -n "$r_base" ]; then
                # otherwise, check if the two histories are "similar"
-               r_l_me=`git log --pretty="format:%s" "$r_other".."$r_me" | grep -v "^Merged" | sort -u`
-               r_l_other=`git log --pretty="format:%s" "$r_me".."$r_other" | grep -v "^Merged" | sort -u`
+               r_l_me=`git log --pretty="format:%s" "$r_other".."$r_me" | grep -v "^Merge" | sort -u`
+               r_l_other=`git log --pretty="format:%s" "$r_me".."$r_other" | grep -v "^Merge" | sort -u`
 
                # heuristics: upstream rebase/filter-branch if more than 50% of the commits of one of the sides are in the other too
                r_lc_me=`echo "$r_l_me" | wc -l`
@@ -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
@@ -232,7 +232,8 @@ fix_upstream_rebase_mergefail()
 case "$cmd" in
        fix_upstream_rebase)
                for d in $repos; do
-                       fix_upstream_rebase_mergefail && fix_upstream_rebase_mergeok
+                       enter "$d0/$d" verbose
+                       verbose fix_upstream_rebase_mergefail && verbose fix_upstream_rebase_mergeok
                done
                ;;
        update|pull)
@@ -255,7 +256,7 @@ case "$cmd" in
                                        r=${r#refs/heads/}
                                        if git config branch.$r.remote >/dev/null 2>&1; then
                                                if ! verbose git pull; then
-                                                       fix_upstream_rebase_mergefailed || true
+                                                       fix_upstream_rebase_mergefail || true
                                                        check_mergeconflict "$d"
                                                        echo "Pulling failed. Press ENTER to continue, or Ctrl-C to abort."
                                                        read -r DUMMY