Bound note header parsing

This commit is contained in:
2026-10-02 15:13:04 +03:00
parent 773f3b550f
commit 0e5d76901d
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -62,9 +62,9 @@ cmd_latest() {
local blob obj note br rnd best="" best_round=-1
while read -r blob obj; do
note=$(git notes --ref="$NOTES_REF" show "$obj") || continue
br=$(sed -n 's/^branch: //p' <<<"$note")
br=$(sed -n '/^$/q; s/^branch: //p' <<<"$note")
[ "$br" = "$branch" ] || continue
rnd=$(sed -n 's/^round: //p' <<<"$note")
rnd=$(sed -n '/^$/q; s/^round: //p' <<<"$note")
[[ "$rnd" =~ ^[0-9]+$ ]] || continue
if [ "$rnd" -gt "$best_round" ]; then
best_round=$rnd