From 6deb170bcc361af6d14337bd914b5638d7d603b4 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Thu, 2 Jun 2016 09:31:59 +1000 Subject: [PATCH] check_left: make it much faster but less accurate --- check_left | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) 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 -- 2.39.2