Re: RCS keyword expansion

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jan Hudec
Date: Friday, October 12, 2007 - 5:57 am

On Fri, Oct 12, 2007 at 11:50:51 +0100, Peter Karlsson wrote:

It does not -- the blob ID is the same. And you can indeed get $Id$ expanded
to that (see gitattributes(5)). However, that's the ONLY thing that is the
same. The date of last modification or ID of commit that last touched that
file might not.

Why? Because git tracks content, not history. The trees and blobs (files) a=
re
identified by SHA1 hashes of their content. Only commit objects add the
notion of history. Thus if two commits contain file with the same text, it's
the same file. Even if the file is the same in those commit purely by
accident.


Yes. But you need the (current) commit for that. Now if a file foo is the
same on branches A and B, switching between them will not touch that file,
but git log foo may well give you completely different results. That's why
there's no date or commit that last touched a file.


If you read the (already mentioned) gitattributes(5) manpage, you'll find
description of smudge and clean filters. They will be applied to each file
written out to the tree and read back respectively. But be sure to understa=
nd
why you can't -- for principial, not techical reasons -- have the date or
commit ID expanded correctly in all cases.

--=20
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RCS keyword expansion, Peter Karlsson, (Thu Oct 11, 7:47 am)
Re: RCS keyword expansion, Johannes Sixt, (Thu Oct 11, 8:02 am)
Re: RCS keyword expansion, Randal L. Schwartz, (Thu Oct 11, 8:09 am)
Re: RCS keyword expansion, Oliver Kullmann, (Thu Oct 11, 8:59 am)
Re: RCS keyword expansion, Peter Karlsson, (Thu Oct 11, 10:55 am)
Re: RCS keyword expansion, Alex Riesen, (Thu Oct 11, 11:09 am)
Re: RCS keyword expansion, Lars Hjemli, (Thu Oct 11, 12:16 pm)
Re: RCS keyword expansion, Alex Riesen, (Thu Oct 11, 12:21 pm)
Re: RCS keyword expansion, Johannes Schindelin, (Thu Oct 11, 1:47 pm)
Re: RCS keyword expansion, Sam Vilain, (Thu Oct 11, 2:20 pm)
Re: RCS keyword expansion, Sam Vilain, (Thu Oct 11, 2:35 pm)
Re: RCS keyword expansion, Peter Karlsson, (Thu Oct 11, 10:26 pm)
Re: RCS keyword expansion, Peter Karlsson, (Thu Oct 11, 10:27 pm)
Re: RCS keyword expansion, Johannes Schindelin, (Fri Oct 12, 3:02 am)
Re: RCS keyword expansion, Peter Karlsson, (Fri Oct 12, 3:50 am)
Re: RCS keyword expansion, Johannes Sixt, (Fri Oct 12, 4:05 am)
Re: RCS keyword expansion, Lars Hjemli, (Fri Oct 12, 4:21 am)
Re: RCS keyword expansion, Johannes Schindelin, (Fri Oct 12, 4:34 am)
Re: RCS keyword expansion, Jan Hudec, (Fri Oct 12, 5:57 am)
Re: RCS keyword expansion, Salikh Zakirov, (Fri Oct 12, 12:08 pm)
Re: RCS keyword expansion, Johannes Schindelin, (Fri Oct 12, 3:42 pm)
Re: RCS keyword expansion, Zakirov Salikh, (Fri Oct 12, 4:52 pm)
Re: RCS keyword expansion, Peter Karlsson, (Mon Oct 15, 7:03 am)
Re: RCS keyword expansion, Johannes Schindelin, (Mon Oct 15, 7:28 am)