Re: Something like $Id$, $Revision$ or $Date$?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Michal Nazarewicz <mina86@...>
Cc: <git@...>
Date: Monday, November 10, 2008 - 2:03 pm

Dnia poniedziałek 10. listopada 2008 18:38, Michal Nazarewicz napisał:

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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Something like $Id$, $Revision$ or $Date$?, Michal Nazarewicz, (Mon Nov 10, 1:38 pm)
Re: Something like $Id$, $Revision$ or $Date$?, Jakub Narebski, (Mon Nov 10, 2:03 pm)
Re: Something like $Id$, $Revision$ or $Date$?, Michal Nazarewicz, (Mon Nov 10, 4:00 pm)
Re: Something like $Id$, $Revision$ or $Date$?, Jakub Narebski, (Mon Nov 10, 4:17 pm)
Re: Something like $Id$, $Revision$ or $Date$?, Francis Galiegue, (Mon Nov 10, 4:24 pm)
Re: Something like $Id$, $Revision$ or $Date$?, Jakub Narebski, (Mon Nov 10, 4:32 pm)
Re: Something like $Id$, $Revision$ or $Date$?, Brian Gernhardt, (Mon Nov 10, 4:58 pm)