On Tue, Aug 16, 2016 at 11:54:19AM +0500, Andrey Rahmatullin wrote:
> On Tue, Aug 16, 2016 at 07:50:37AM +0100, Ghislain Vaillant wrote:
> > > > For example, support I'm packaging 0~git.abc123d.  This version number
> > > > might be used because I'm basing my packaging on upstream git commit
> > > > whose hash is uniquely identified by the string 'abc123d'.
> > > 
> > > Such version numbers won't order correctly.  Didn't you mean to include
> > > a monotonically increasing component before the hash?
> > 
> > Generally speaking, is there a recommended Debian version format for
> > git snapshots?
> 1.1+20160816, or ~ instead of +, as usual.
> Unless you are packaging two different snapshots committed at the same
> day.

If the repository contains any tags, I'd strongly recommend the output of
"git describe --tags".  This will, beside DTRT when you're exactly on a
tag (ie, on a release), produce version numbers of the form:
<recent tag>-<# of commits>-g<short hash>, which is both monotonic if you
fast-forward and can be given to git to unambigously refer to the commit
you're uploading even to users of other branches.

For example, one of my projects is currently at 0.17-128-g8606a54.

-- 
An imaginary friend squared is a real enemy.

Reply via email to