Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

Re: How to embed a hash, tag or branch name?

From: Mikko Rapeli <hidden>
Date: 2016-06-15 22:47:08

On Fri, Jul 31, 2009 at 02:27:50AM -0700, Jakub Narebski wrote:
You can embed SHA-1 of a _file contents_ (blob) using '$Id: $' keyword
with `ident` attribute - see gitattributes manpage.
Great, thanks!
The correct solution of embedding version number is to do it at 
_build time_, using e.g. script similar to GIT-VERSION-GEN used by
Git itself and by Linux kernel.  It helps if you tag your releases.
This would help, but I'm on cygwin/msysgit and compiling with a
microcontroller IDE MPLAB and PICC-18 compiler, so I really don't
want to dig deeper into build time integration at the moment.

Btw, I don't know how didn't notice that this is a FAQ:
http://git.or.cz/gitwiki/GitFaq#Doesgithavekeywordexpansion.3F

-Mikko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help