On Mon, Aug 5, 2019 at 9:20 AM Martin Liška <mli...@suse.cz> wrote: > Based on the IRC discussion with Jakub, there's missing key element of the > transition. > Jakub requests to have a monotonically increasing revisions (aka rXXXXXXX) to > be assigned > for the future git revisions. These will be linked from bugzilla and > http://gcc.gnu.org/rNNNNN > > I don't like the suggested requirement and I would prefer to use git hashes > for both bugzilla > links and general references to revisions. That's what all projects using git > do.
I agree. But for those who want a monotonically increasing identifier, there's already one in git: CommitDate. In the discussion of this issue four years ago, https://gcc.gnu.org/ml/gcc/2015-09/threads.html#00028 I provided a set of git aliases to generate and use reposurgeon-style action stamps for naming commits. For Jakub's use-case, the committer part of the action stamp is probably unnecessary, just the date/time part should be enough. Looking at it again, I notice that the different timezones in the committer date would interfere with sorting, so this update to the stamp alias uses UTC unconditionally: stamp = "!f(){ TZ=UTC git show -s --date='format-local:%Y-%m-%dT%H:%M:%SZ' --format='%cd!%ce' ${1:+\"$@\"}; }; f" To drop the committer from the stamp, remove "!%ce" from the format argument. Jakub, it seems to me that this should do the trick for you; binaries would be named by date/time rather than by revision. What do you think? Jason