Repository navigation
v1.2 — scoped notes refspec, and two silent corruptions
Three fixes, each reproduced against a throwaway origin.
Force-pushing every notes ref destroyed unrelated notes. The refspec covered
+refs/notes/*:refs/notes/*, so fetch and push both forced every notes ref
rather than only this tool's. A clone that had not re-fetched rolled
refs/notes/commits back to whatever it last saw — losing notes pushed by
someone else, silently and with a zero exit code. Now scoped to
refs/notes/buildnumbers, kept as a glob because a plain refspec is fatal while
the ref does not exist yet, which is every first run.
A failing push died on an unbound variable. test "$1" != "nofail" runs
under set -u, and _push is called with no argument from push, sync and
force. So instead of reporting the push failure, the script aborted with
$1: unbound variable.
A git warning could end up inside the build number. The note was read with
2>&1, folding stderr into the returned value — which callers pass straight to
--build-number and into store metadata.
Two known issues were left for v1.3: concurrent generate on two commits could
assign the same number, and force-incr recursed without bound when a push kept
failing.
Written after the fact, from the commits — this tag was published without
notes.