]> git.ozlabs.org Git - next-scripts/commitdiff
final_msg: use new get_* functions
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 7 Dec 2022 04:13:28 +0000 (15:13 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 7 Dec 2022 04:13:28 +0000 (15:13 +1100)
add another one to get the prending fixes branches

common.sh
final_msg

index 5ed27b92f9b4804e14989a3018c7036269ff1c17..31b39221a03a8a579f070c62270732d02e3b38c1 100644 (file)
--- a/common.sh
+++ b/common.sh
@@ -83,6 +83,11 @@ get_branches()
        awk -F "$_TAB" '/^[^#]/ && $2=="git"{ print $3; }' "$CTRL_FILE"
 }
 
+get_pending_branches()
+{
+       awk -F "$_TAB" '/^[^#]/ && $2=="git"{ print $3; } $1=="pending-fixes" { exit; }' "$CTRL_FILE"
+}
+
 get_contacts()
 {
        get_control_field "$1" 1
index 979da9b6bfa196a37dd87260a4427d5e9def2801..0412a2e6ba40c15dac1828e245d6060f0bb4c60a 100755 (executable)
--- a/final_msg
+++ b/final_msg
@@ -9,9 +9,9 @@ subject="linux-next: Tree for $(date --date "5 hours ago" '+%b %-d')"
 prev=$(git tag -l next-* | sort | tail -n 2 | head -n 1 | sed 's/next-//')
 nmc=$(git rev-list --no-merges --count origin/master..HEAD^)
 ss=$(git diff --shortstat -M -C origin/master..HEAD^)
-ntrees=$(grep -v -c '^#' "$CTRL_FILE")
-npend=$(sed '/^#/d;/^pending-fixes/q' "$CTRL_FILE" | wc -l)
-npend=$(( npend - 2 ))
+ntrees=$(get_branches | wc -l)
+npend=$(get_pending_branches | wc -l)
+npend=$(( npend - 1 ))
 
 sed -i.bak -e 's/^\(Changes since\) [0-9]*:/\1 '"$prev"':/' \
     -e 's/^\(Non-merge commits .*:\) [0-9]*/\1 '"$nmc"'/'\