From 978132413a62295c21b65e5bff52e7cb586a136b Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 5 Nov 2025 11:49:05 +1100 Subject: [PATCH] fix up get_pending_fixes --- common.sh | 10 +++++++++- final_msg | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) 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"'/'\ -- 2.47.3