Review note push

This commit is contained in:
2026-10-02 14:45:17 +03:00
parent e7adb3e88b
commit 4664e71493
2 changed files with 17 additions and 1 deletions
+11 -1
View File
@@ -8,6 +8,7 @@ fail() { echo "FAIL: $*" >&2; exit 1; }
tmp=$(mktemp -d)
trap 'rm -rf "$tmp"' EXIT
git init -q --bare "$tmp/remote.git"
git init -q -b main "$tmp/repo"
cd "$tmp/repo"
git config user.email test@example.com
@@ -68,4 +69,13 @@ sed -e 's/^round: 1/round: 2/' -e "s/^previous: none/previous: $PREV/" "$tmp/not
if "$rn" latest nosuch >/dev/null 2>&1; then fail "latest should exit 1 for an unknown branch"; fi
echo "ok: show/write/latest"
# push publishes notes to origin; a fresh clone picks them up
git remote add origin "$tmp/remote.git"
git push -q origin main
"$rn" push
git clone -q "$tmp/remote.git" "$tmp/clone"
cd "$tmp/clone"
git fetch -q origin "refs/notes/review:refs/notes/review"
"$rn" latest main | grep -q '^round: 2$' || fail "clone should see the round 2 note"
echo "ok: show/write/latest/push"