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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le Monday 10 November 2008 16:48:48 Michal Nazarewicz, vous avez écrit :
[...]
>
> The thing is that for some repositories I don't distinguish anything
> like a "release version" of files.

"Git tracks contents, not files".

You have two problems here:
* first, unlike CVS, files don't have revisions;
* second, unline SVN (or even Mercurial), commits are not "ordered", at least 
not in a natural way (can't tell what SHA1 is more recent).

Git will not track a single file, and I don't think it will ever do so. And 
then, what about renames?

You have two options there:

1. (requires git modification, I guess) put a $last_modified_date$ magic that 
expands to the last modification date;
2. (what I do) keep an internal ChangeLog for such files, that you (have to) 
fill by hand each time.

The second approach has big advantages:
* you can date your changes;
* you _really_ know the file history;
* git's renaming handle allows you to track this ChangeLog over time!

It requires discipline, though...

-- 
fge
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux