Re: On git 1.6 (novice's opinion)
- From
Kris Shannon <kris@shannon.id.au>
- Date
- Apr 1, 2009, 02:32 UTC
- Message-ID
- <e51f4f550903311932x118e1378yc1b25e5d9c97d50d@mail.gmail.com>
- In-Reply-To
- <49CC8C90.12268.242CEFCE@Ulrich.Windl.rkdvmks1.ngate.uni-regensburg.de>
2009/3/27 Ulrich Windl <ulrich.windl@rz.uni-regensburg.de>:
> 2) Keyword substitution. I know it's controverse (dealing with binary files), > but I'd like to have some automatic version numbering keyword at least: > Initial idea is that every commit with a change increments the number by one, > and when merging numbers a and b, the resulting number is max(a, b) + 1.
Check out gitattributes(5) - the ident attribute:
When the attribute ident is set for a path, git replaces $Id$ in the blob object with $Id:, followed by the 40-character hexadecimal blob object name, followed by a dollar sign $ upon checkout. Any byte sequence that begins with $Id: and ends with $ in the worktree file is replaced with $Id$ upon check-in.
That means the Id is file specific, not commit specific - just like the $Id$ expansion for CVS and SCCS is about the file (as there is no real concept of a commit in CVS and SCCS)