]> git.ozlabs.org Git - next-scripts/commitdiff
check_left: make it much faster but less accurate
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 1 Jun 2016 23:31:59 +0000 (09:31 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 1 Jun 2016 23:31:59 +0000 (09:31 +1000)
check_left

index 27c8ad3394f84b862cd8ffec367e999bdbd1ca48..1e1a7493bad88640cb982899d7aae2395673802b 100755 (executable)
@@ -4,21 +4,34 @@ LOG_FILE="../left_over.log"
 
 cp /dev/null "$LOG_FILE"
 
-heads=$(grep -v '^#' ../etc/control | awk -F ' ' '$2=="quilt" { printf("quilt/%s ", $3); } $2=="git" { printf("%s/%s ", $3, $5); }')
+heads=$(awk -F '\t' '/^#/ {next;} { printf("%s/%s ", $3, $5); }' ../etc/control)
 
-for h in $heads; do
-       echo "$h"
-       mb=$(git merge-base origin/master "$h")
-       rh=$(git rev-parse "$h")
-       [ "$mb" = "$rh" ] &&
-               continue
+total=0
 
-       c=$(git rev-list --pretty='format:%m%H' --no-merges --left-right --cherry-pick origin/master..."$h" | sed -n 's/^>//p')
-       [ -z "$c" ] &&
+for h in $heads; do
+       base=origin/master
+       case "$h" in
+       akpm/*)
+               base=akpm/master-base
+               ;;
+       esac
+#      echo "$h"
+#      mb=$(git merge-base origin/master "$h")
+#      rh=$(git rev-parse "$h")
+#      [ "$mb" = "$rh" ] &&
+#              continue
+
+#      c=$(git rev-list --pretty='format:%m%H' --no-merges --left-right --cherry-pick origin/master..."$h" | sed -n 's/^>//p')
+#      c=$(git rev-list --no-merges origin/master.."$h")
+#      [ -z "$c" ] &&
+#              continue
+       count=$(git rev-list --count --no-merges "$base".."$h")
+       [ "$count" == 0 ] &&
                continue
 
-       echo "$h" $(echo "$c" | wc -w) | tee -a "$LOG_FILE"
-       git shortlog --no-walk "$c" 2>&1 | tee -a "$LOG_FILE"
+       echo "$h" "$count" | tee -a "$LOG_FILE"
+#      git shortlog --no-walk "$c" 2>&1 | tee -a "$LOG_FILE"
+       git log --oneline --no-merges "$base".."$h" | tee -a "$LOG_FILE"
 
 #      gitk stable..$h