From: Stephen Rothwell Date: Wed, 5 Nov 2025 00:49:05 +0000 (+1100) Subject: fix up get_pending_fixes X-Git-Url: http://git.ozlabs.org/?a=commitdiff_plain;h=978132413a62295c21b65e5bff52e7cb586a136b;p=next-scripts fix up get_pending_fixes --- diff --git a/common.sh b/common.sh index f0c93f1..0af4182 100644 --- a/common.sh +++ b/common.sh @@ -88,7 +88,15 @@ get_branches() get_pending_branches() { - awk -F "$_TAB" '/^[^-#]/ && $2=="git"{ print $3; } $1=="pending-fixes" { exit; }' "$CTRL_FILE" + awk -F "$_TAB" ' + BEGIN { show=0 } + /^#/ { next } + $2=="switch" { if ($3=="fs-current" || $3=="master" ) show=1 + else if ($3=="fs-next") show=0 + next } + $2=="branch" && $3=="pending-fixes" { exit } + $2=="git" && $3=="fs-current" { next } + $2=="git" { if (show == 1) print $3 }' "$CTRL_FILE" } get_contacts() diff --git a/final_msg b/final_msg index 2a940c8..ef693dc 100755 --- a/final_msg +++ b/final_msg @@ -11,7 +11,8 @@ nmc=$(git rev-list --no-merges --count origin/master..HEAD^) ss=$(git diff --shortstat -M -C origin/master..HEAD^) ntrees=$(get_branches | wc -l) npend=$(get_pending_branches | wc -l) -npend=$(( npend - 1 )) +# add one for my fixes tree +npend=$(( npend + 1 )) sed -i.bak -e 's/^\(Changes since\) [0-9]*:/\1 '"$prev"':/' \ -e 's/^\(Non-merge commits .*:\) [0-9]*/\1 '"$nmc"'/'\