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