Bound note header parsing
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user