From: Junio C Hamano Date: Tue, 20 Oct 2009 20:43:05 GMT Subject: Re: ident hash usage question Message-ID: <7veioxn6ee.fsf@alter.siamese.dyndns.org> In-Reply-To: <76c5b8580910201330r45cf625k3a41b5b9e24b3e01@mail.gmail.com> Eugene Sajine writes: > One of my friends said that git is not working for their development > model... C++ development with static linking across the board, where > they need to see exactly which version of the file has got to the > executable. Roughly, they are using CVS' keywords and revision numbers > and a script wich matches them between two versions of the > executables. > > I've got curious if Git can support it and how it can be done with > minimal changes to workflow. If the project is already arranged to be compiled with decent automation, I do not think you need any change to the workflow. You would have a version.cc file with static char program_version[] = "My Program " VERSION_STRING; in it, and teach the build procedure how to compile and link this file. Something like: version.o: version.cc $(CXX) -o $@ -DVERSION_STRING=\""$(git describe HEAD)"\" $?