Sebastian Schuberth <> writes:

> On Fri, Sep 6, 2013 at 11:40 PM, Junio C Hamano <> wrote:
>>> For custom builds of Git it sometimes is inconvenient to annotate tags
>>> because there simply is nothing to say, so do not require an annotation.
>>> Signed-off-by: Sebastian Schuberth <>
>>> ---
>> Hmmmm, personally I'd actually want this to stay the way it is, or
>> even require a valid signed tag, in order to make sure I won't
>> mistakenly creating a lightweight tag.

I do not mind taking the patch after all, after thinking about it
a bit more.

See later part of the message for this.

>> If you want to give build a custom name,
>>     echo buildname >version
>> should be sufficient, no?
> That's not sufficient if you care about a proper (automated) release
> workflow with your releases tagged.

I take the above "your" does not refer to "mine, Junio's".

I am not sure what you mean by automated, but if you can tell your
automation infrastructure that the way to build this Git software is
to run "make" in it, shouldn't it be trivial to instead tell it to
run something like this instead?

        git describe --tags HEAD >version && make

Or are these tags you want G-V-G to use also droppings of the
automated process?  That is, what you tell the automation
infrastructure is to run something like this?

        git tag build-$(date +"%Y-%m-%d") && make

If that is the case, it would be sufficient to tweak that to leave
the same information in >version file and you do not lose any

So I do not understand the above "not sufficient if you care about"
comment at all.

Having said all that.

I do not think the current use of "describe" helps the builder to
avoid making a light-weight tag by mistake anyway, as it would be
very natural to update DEF_VER to a matching string. In a month or
so, I am sure I'd update that line to v1.8.5 before I make a tag
with the same name, and it does not matter if the current use of
"describe" skipped a mistakenly-made lightweight v1.8.5 tag when
deciding the embedded version string---the end result will get the
same string from DEF_VER and running "git version" with the built
binary will happily show v1.8.5 the same way.

I am however still curious what kind of other tags (either signed,
annotated, or lightweight) you are using for this purpose. Is there
a case where you have your own tag that points at the exact version
as I tagged?  In such a case, do you have a preference on which tag
do you want GIT-VERSION-GEN to use?
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to