Re: [PATCH] GIT-VERSION-GEN: Use standard versioning suffix
- From
- Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
- Date
- Sep 5, 2025, 12:32 UTC
- Message-ID
- <8e8255bf-79d0-41ee-85a9-d664ee01b5ae@app.fastmail.com>
- In-Reply-To
- <20250905-semver-v1-1-3f6dd32f71a3@pengutronix.de>
Hi
The following might not be immediately relevant in light of what brian just wrote.
On Fri, Sep 5, 2025, at 14:14, Jonas Rebmann wrote:
Show 9 quoted lines
>[snip]
> This is not semver compliant which makes the output harder to parse in
> tooling such as b4, which currently errors out when using a snapshot
> build of git.
>
> For snapshot builds, use as version string the unmodified git-describe
> output with only the leading v stripped from the tag.
>
> Fixes: 5c7d3c9507f7 ("Allow building of RPM from interim snapshot.")For other readers: this can be traced back to from
• `git log -S'VN=$(echo "$VN"' GIT-VERSION-GEN` • which finds 374dfaa2e39 (Make GIT-VERSION-GEN tolerate missing git describe command again, 2006-01-26) • which in turn references this 5c7d3c9507f (Allow building of RPM from interim snapshot., 2006-01-16)
This project doesn’t use this Kernel-style trailer.[1] Also not the commit reference style. (It uses `git show -s --pretty=reference <commit>`)
It’s more common to place it inside the body of the message. Like a replacement for the preceding “historical reasons”.
† 1: It’s almost only trailers which attribute people. (I am having a hard
time coming up with exceptions; you can find at least
one Cherry-picked-from)> Signed-off-by: Jonas Rebmann <jre@pengutronix.de>