From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Eygene Ryabinkin <rea-git@codelabs.ru>,
Junio C Hamano <junkio@cox.net>, Alex Riesen <raa.lkml@gmail.com>
Subject: Re: Memory overrun in http-push.c
Date: Fri, 2 Mar 2007 10:05:12 +0000 [thread overview]
Message-ID: <200703021005.13620.andyparkins@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.63.0703012140370.22628@wbgn013.biozentrum.uni-wuerzburg.de>
On Thursday 2007 March 01 20:43, Johannes Schindelin wrote:
> > Putting $Id$ $Rev$ in a git managed file would have far more meaning
> > that it does in a CVS managed file.
>
> No. My point was that you do not even have to have an id. The hash of the
> object is the id.
I think you're thinking of these tags in too strict terms. You're right they
aren't /needed/ you can query the version control system for the information.
However, if you sent them out in a tarball to someone who didn't have or want
to have your version control system, then it is much easier for them to be
able to tell you the $Id$ field from the file itself than to generate the
hash or send you a copy of the file.
They're purely for information. As I've mentioned before, personally the only
place I use them is in inkscape SVG files (thank the lord SVG's are ASCII),
where I add a text field that appears on the diagram itself and I write $Id$
as the text. Then whenever I print that diagram out (which makes it much
harder to hash), I will know which version of the file I'm looking at. This
is the /only/ thing I miss from subversion.
> This is obviously much better than the mess of CVS/SVN's file ids. There
> is an option, even, to switch off key expansion, so you can have erroneous
> ids. That just cannot happen with hashes.
As I said, I don't think anyone ever imagines that these Id fields are
absolute guarantees of correctness - nor does any version control
system /ever/ read them and use them. They are there only as a convenience
for the user. Obviously, I could just edit the $Id$ anyway if I wanted, so
it obviously isn't absolute.
> Of course, it does not give you any hint about when this file was current.
> But there is no way to tell in distributed development _anyway_. You have
> to look it up, when, and who, changed the file to the current state.
What about this though:
* Tag a release
* Export the working tree into a fresh directory
* Edit each source file to put the hash of the tagged revision into
every file.
* Edit the makefile to include the tag hash in the released version
* tar it up
* Release
It's such a mundane, useless waste of time to edit the hash in by hand - why
can't the version control system do it?
It's already nearly there in the form of git-describe. It's only purpose is
to supply strings that describe the current revision. Well, so would $Id$,
but for files instead.
I don't see that keywords are the evil they're made out to be; they're for
convenience, not for absolute truth. When some random printout of the source
turns up, at least the $Id$ might give you a clue as to which version it is.
If it doesn't, well you're no worse off.
Here's another similar idea: generating copyright lines. Let's say we want to
copyright every source file - that means writing "(C) Junio, (C) Johannes,
etc" at the top of every file. Wouldn't it be nicer if we could put
$Copyright$ in the file, then have some git-blame-like machinery fill in the
copyrights automatically based on who's made contributions?
e.g.
git-blame refs.c | sort -f 2 | uniq -c -s 10 -w 10 | sort -nr
Andy
--
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
next prev parent reply other threads:[~2007-03-02 12:01 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-28 15:15 Memory overrun in http-push.c Eygene Ryabinkin
2007-02-28 15:41 ` Andy Parkins
2007-02-28 15:42 ` Johannes Schindelin
2007-03-01 5:13 ` Eygene Ryabinkin
2007-03-01 8:15 ` Alex Riesen
2007-03-01 9:11 ` Eygene Ryabinkin
2007-03-01 9:21 ` Alex Riesen
2007-03-01 11:26 ` Eygene Ryabinkin
2007-03-01 9:32 ` Junio C Hamano
2007-03-01 10:04 ` Alex Riesen
2007-03-01 10:40 ` Andy Parkins
2007-03-01 12:00 ` Eygene Ryabinkin
2007-03-01 12:08 ` Junio C Hamano
2007-03-01 13:20 ` Eygene Ryabinkin
2007-03-01 17:11 ` Johannes Schindelin
2007-03-01 18:31 ` Andy Parkins
2007-03-01 18:41 ` Johannes Schindelin
2007-03-01 19:31 ` Andy Parkins
2007-03-01 20:43 ` Johannes Schindelin
2007-03-02 10:05 ` Andy Parkins [this message]
2007-03-02 14:46 ` Jakub Narebski
2007-03-02 15:22 ` Andy Parkins
2007-03-02 19:16 ` Johannes Schindelin
2007-03-02 19:42 ` Andy Parkins
2007-03-04 8:17 ` Daniel Barkalow
2007-03-04 8:31 ` Junio C Hamano
2007-03-04 9:18 ` Daniel Barkalow
2007-03-01 21:43 ` Alex Riesen
2007-03-01 21:54 ` Shawn O. Pearce
2007-03-01 17:52 ` Uwe Kleine-König
2007-03-02 14:38 ` Jakub Narebski
2007-03-02 15:17 ` Johannes Schindelin
2007-03-02 22:52 ` identifying blobs (was Re: Memory overrun in http-push.c) Junio C Hamano
2007-03-02 23:10 ` Linus Torvalds
2007-03-02 15:23 ` Memory overrun in http-push.c Andy Parkins
2007-03-02 15:30 ` Matthieu Moy
2007-03-02 15:48 ` Andy Parkins
2007-02-28 16:36 ` Florian Weimer
2007-03-01 5:19 ` Eygene Ryabinkin
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=200703021005.13620.andyparkins@gmail.com \
--to=andyparkins@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=raa.lkml@gmail.com \
--cc=rea-git@codelabs.ru \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).