From: Jakub Narebski Date: Mon, 10 Nov 2008 18:03:27 GMT Subject: Re: Something like $Id$, $Revision$ or $Date$? Message-ID: <200811101903.27685.jnareb@gmail.com> In-Reply-To: <8763mvlbwb.fsf@erwin.mina86.com> Dnia poniedziaƂek 10. listopada 2008 18:38, Michal Nazarewicz napisaƂ: > Jakub Narebski writes: > > > The reason why git doesn't support keywords like $Revision$ or $Date$ > > is performance: the $Revision$ and $Date$ are keywords related to > > _commit_ data, not blob data. > > In my case identifying content not commit would be even better. Well, in that case using `ident` attribute would be enough (but cryptic). # set `ident` attribute for all files $ echo '* ident' > .gitattributes # check that it is set for file 'foo' $ git check-attr ident -- foo foo: ident: set # edit file to contain '$Id$' keyword $ cat foo ... ... $Id$ ... ... # make a commit $ git commit -a # $Id$ keyword is replaced on checkout $ git add foo $ git checkout foo # and check that it got replaced $ cat foo ... ... $Id: 0ca1524d4460ba6bc91bf3adc9dab13212599243 $ ... ... But you need git to make use of this SHA-1 _blob_ (contents) identifier -- Jakub Narebski Poland