Re: Suggestion: drop 'g' in git-describe suffix
From: Andy Whitcroft <hidden>
Date: 2016-08-11 20:03:13
Santi Béjar wrote:
On 11/2/06, Han-Wen Nienhuys [off-list ref] wrote:quoted
Andy Whitcroft escreveu:quoted
Han-Wen Nienhuys wrote:quoted
tag+sha1 to separate the tag and the committish.Well there is a non-alphabet character in there, a minus (-). The g prefix on the sha1 _fragment_ it to indicate that it is in fact a truncated sha1, not a complete one.I think it is there to indicate it is a git commit sha1.quoted
is this policy documented somewhere? None of the tools understand it. [lilydev@haring git]$ git describe v1.4.3.3-g1e1f76e [lilydev@haring git]$ git show g1e1f76e fatal: ambiguous argument 'g1e1f76e': unknown revision or path not in the working tree. Use '--' to separate paths from revisionsUse the complete output of describe: $ git show v1.4.3.3-g1e1f76e or the abbrev sha1: $ git show 1e1f76equoted
My suggestion is to use v1.4.3.3+1e1f76eMy suggestion is to use: v1.4.3.3-git1e1f76e to make clear that it is a git revision version. One problem I see with this scheme (either 'g', 'git' of '+') is that it does not provide an increasing version number, even for fast-forwarding commits. Then it is not useful as a package version number (deb or rpm). I've already seen deb packages with version+git20061010. One possibility could be to add the number of commits between the tag and the commit as: v1.4.3.3-git12g1e1f76e to provide a weak ordering for fast-forwarding commits. What do you thing?
I think you'll restart the 1.2.3.4 versioning is better 'debate' again! Surly if things are being pushed into a .deb or .rpm we should be using a real release version. We should be tagging that. If the project is not providing release number, there is nothing stopping you from tagging them yourself in your copy of the repository and using your tag. you could use like 'unofficial-N' where N increments in the way you want.