git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 19, 2016, 17:04 UTC
Message-ID
<xmqqoa5th84d.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAJo=hJviMd3tWe_HUmh0M0Y2TOCwwrZX14hdyivPSYQ1ck052w@mail.gmail.com>
Shawn Pearce <spearce@spearce.org> writes:
Show 12 quoted lines
> On Mon, Jul 18, 2016 at 9:32 PM, Parker Moore <parkrmoore@gmail.com> 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.

Previous: Shawn PearceNext: Parker Moore
Message 6 of 8 in “contrib/persistent-https: update ldflags syntax for Go 1.7+”
  1. contrib/persistent-https: update ldflags syntax for Go 1.7+Parker Moore, Jul 15, 2016
  2. Jeff KingJul 16, 2016
  3. Junio C HamanoJul 18, 2016
  4. Parker MooreJul 19, 2016
  5. Shawn PearceJul 19, 2016
  6. Junio C HamanoJul 19, 2016
  7. Parker MooreJul 19, 2016
  8. Junio C HamanoJul 20, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.