Subject: Re: [PATCH] contrib/persistent-https: update ldflags syntax for Go 1.7+

From: Junio C Hamano <[email-masked]>
Date: Tue, 19 Jul 2016 10:04:34 -0700

Shawn Pearce <[email-masked]> writes:

> On Mon, Jul 18, 2016 at 9:32 PM, Parker Moore <[email-masked]> wrote:
>>> The label does not even identify the version of the source in any way, so I am not sure how people are depending on that feature anyway ;-)
>>
>> Would it be a better solution simply to remove this build flag?
>> Alternatively, if Git wished to support Go v1.5 and below, I would be
>> more than happy to send a patch with a dynamic lookup in the Makefile
>> based on the output of `go version`. I would be more than happy to
>> submit either patch.
>
> I think we could remove that BUILD_LABEL entirely. Colby liked having
> a marker so he knows what "version" a user is running, but without any
> correlation to source here it just isn't that useful.

Inside an organization where people use it as a tool supplied by
somebody else, who is the designated supplier of it, build-stamp may
be sufficient to identify what "version" a user is running.  If we
wanted to do a "here is the source that was built from", the logical
place to pull that information from would be ../../GIT-VERSION-FILE,
but the mechanism to embed the information would still be -X var=val
(or "-X var val" for older Go).

So unless the "dynamic lookup in the Makefile" turns out to be too
gross, we would want to keep the mechanism and just make it usable
for versions before 1.5 and also after 1.7, I would guess.