bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: git-version-gen: add support for empty release commits


From: Dmitry V. Levin
Subject: Re: git-version-gen: add support for empty release commits
Date: Sat, 11 May 2019 11:55:07 +0300

Hi,

On Sat, May 11, 2019 at 12:31:16AM +0200, Bruno Haible wrote:
> Hi,
> 
> I'm using git-version-gen in GNU gettext. For the 0.20 release, I
> created an empty commit, like this:
> 
>     CURRENT_VERSION=0.20
>     git commit --allow-empty -m "Release $CURRENT_VERSION"
>     git tag v$CURRENT_VERSION

This doesn't create a tag object, so ...

> Now, git-version-gen ignores this release commit:
> 
> $ git describe --abbrev=4 --match="v*" HEAD
> v0.19.8.1-519-g62b2a

... this doesn't use v0.20 which is just a reference to a commit object.

> $ git describe --abbrev=4 --match="v*" --debug HEAD
> searching to describe HEAD
> finished search at c737bf843616ca984c9416048a2da845e9ad3f50
>  annotated        519 v0.19.8.1
> traversed 520 commits
> v0.19.8.1-519-g62b2a
> 
> The fix is to add a --tags option to the 'git describe' command:
> 
> $ git describe --abbrev=4 --tags --match="v*" HEAD
> v0.20-4-g62b2a
> 
> $ git describe --abbrev=4 --tags --match="v*" --debug HEAD
> searching to describe HEAD
> finished search at c737bf843616ca984c9416048a2da845e9ad3f50
>  lightweight        4 v0.20
>  annotated        519 v0.19.8.1
> traversed 520 commits
> v0.20-4-g62b2a
> 
> Therefore here's the proposed fix:
> 
> 
> 2019-05-10  Bruno Haible  <address@hidden>
> 
>       git-version-gen: Add support for empty release commits.
>       * build-aux/git-version-gen: Invoke 'git describe' with option --tags.

This change has nothing to do with empty release commits.
In fact, git describe doesn't care about emptiness of commits.

This change is about using lightweight tags (which are not tag objects
but references to commit objects) in git-version-gen.


-- 
ldv

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]