From: Francis Galiegue <fg@one2team.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Michal Nazarewicz <mina86@tlen.pl>, git@vger.kernel.org
Subject: Re: Something like $Id$, $Revision$ or $Date$?
Date: Mon, 10 Nov 2008 21:24:59 +0100 [thread overview]
Message-ID: <200811102124.59973.fg@one2team.com> (raw)
In-Reply-To: <200811102117.30372.jnareb@gmail.com>
Le Monday 10 November 2008 21:17:29 Jakub Narebski, vous avez écrit :
> Michal Nazarewicz wrote:
> > Jakub Narebski <jnareb@gmail.com> writes:
> >> Dnia poniedziałek 10. listopada 2008 18:38, Michal Nazarewicz napisał:
> >>> Jakub Narebski <jnareb@gmail.com> 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).
> >
> > Yes, but it forces me to do some voodoo magic (ie. checkout) to get the
> > Id in the file, ;) like so:
> >
> > #v+
> > $ echo '$Id$'>bar && git add bar && git commit -m 'Added bar' && cat bar
> > Created commit d49d436: Added bar
> > 1 files changed, 1 insertions(+), 0 deletions(-)
> > create mode 100644 bar
> > $Id$
> > $ rm bar && git checkout bar && cat bar
> > $Id: 055c8729cdcc372500a08db659c045e16c4409fb $
> > #v-
>
> Well, _some_ command has to be invoked to expand keywords. "git add"
> doesn't do that (perhaps it should?), so you need to use checkout.
>
If "git add" aims to do that, you'd have to be very, VERY careful, not to
substitute in the wrong place to start with, not to attempt substitution in
binary files...
And this would have a sizeable cost, imho. If you really want to do this,
isn't there a hook somewhere that can do that for you, instead of modifying
git add directly?
--
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 6 83 87 78 75
Tel : +33 (0) 1 78 94 55 52
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris
next prev parent reply other threads:[~2008-11-10 20:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-10 0:22 Something like $Id$, $Revision$ or $Date$? Michal Nazarewicz
2008-11-10 0:43 ` Sverre Rabbelier
2008-11-10 1:16 ` Michal Nazarewicz
2008-11-10 3:43 ` dhruva
2008-11-10 9:49 ` Michal Nazarewicz
2008-11-10 7:26 ` Johannes Sixt
2008-11-10 12:25 ` Johannes Schindelin
2008-11-10 14:05 ` dhruva
2008-11-10 15:48 ` Michal Nazarewicz
2008-11-10 15:58 ` Francis Galiegue
2008-11-10 15:59 ` Jakub Narebski
2008-11-10 17:38 ` Michal Nazarewicz
2008-11-10 18:03 ` Jakub Narebski
2008-11-10 20:00 ` Michal Nazarewicz
2008-11-10 20:17 ` Jakub Narebski
2008-11-10 20:24 ` Francis Galiegue [this message]
2008-11-10 20:32 ` Jakub Narebski
2008-11-10 20:58 ` Brian Gernhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200811102124.59973.fg@one2team.com \
--to=fg@one2team.com \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=mina86@tlen.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.