From: Stephen Rothwell Date: Wed, 1 Jun 2016 23:31:59 +0000 (+1000) Subject: check_left: make it much faster but less accurate X-Git-Url: http://git.ozlabs.org/?a=commitdiff_plain;h=6deb170bcc361af6d14337bd914b5638d7d603b4;p=next-scripts check_left: make it much faster but less accurate --- diff --git a/check_left b/check_left index 27c8ad3..1e1a749 100755 --- a/check_left +++ b/check_left @@ -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