Re: CVS differencies

"Craig A. Berry" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Mar 14, 2012, at 4:59 PM, Frediano Ziglio wrote:

> Well...one difference from CVS to git is keywork expansion.
> 
> I found two articles
> http://stackoverflow.com/questions/1792838/enable-ident-string-for-git-repos
> http://kalug.linux.org.tw/~lloyd/bblog/archives/2009/12/24/%5Btip%5D_git_ident_and_export-subst_howto/
> 
> Is it also possible to write some filter before/after check in/out.
> 
> Personally I'd prefer to have a single source file with the commit
> hash, maximun a date in documentation. I'd prefer to avoid waiting for
> a checkout.

If you're just looking for a way to generate something that unambiguously defines where we are when generating a snapshot, there are various options, including some you've found.  For its branches that are served up via rsync, Perl generates a file called .patch using the facility at: <http://perl5.git.perl.org/perl.git/blob/HEAD:/Porting/GitUtils.pm>.  The contents of the generated file look like

blead 2012-03-14.01:49:14 30a7372d99391a59ada56a6bf8e6b9955e828bec v5.15.8-134-g30a7372

which gives you various short and long forms of everything you'd want to know about when in time and where in the commit history you were when it was generated (and what branch you were on).

The $Id$ equivalent is harder.  If you could modify the content of a file in something like a post-commit hook, you would invalidate the SHA1 commit identifier that uniquely names that commit.  My advice would be to give up versioning individual files and rely on the myriad ways of tracking history in the git repository.

________________________________________
Craig A. Berry
mailto:[email protected]

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.