build: Backport "generate strictly increasing git revisions"