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

Re: Could GIT manage revision headers embedded in code ?

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 2, 2017, 15:54 UTC
Message-ID
<alpine.DEB.2.20.1705021751250.3480@virtualbox>
In-Reply-To
<135C7A92C7D64E488B830ADC2970C70132AE6407@SVGEA-EMAIL.gea.fr>
Hi Eric,
On Tue, 2 May 2017, Delanoe Eric wrote:
> Could this kind of "keyword expansion" feature be added into GIT ?

Back in the days, it was decided that this should be part of the "export as zip" functionality, see the `export-subst` feature in git-archive's and gitattributes' documentation.

In reality, what most projects do is to generate a header or some such as part of their build process. Git itself may serve as a case in point:

	https://github.com/git/git/blob/master/GIT-VERSION-GEN
used in
	https://github.com/git/git/blob/v2.12.2/Makefile#L390-L392

Ciao, Johannes

Previous: Delanoe Eric
Message 4 of 4 in “Could GIT manage revision headers embedded in code ?”
  1. Delanoe EricMay 2, 2017
  2. Christian CouderMay 2, 2017
  3. Delanoe EricMay 2, 2017
  4. Johannes SchindelinMay 2, 2017

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.