From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: Re: [RFC] git-add update with all-0 object
Date: Fri, 1 Dec 2006 09:37:07 +0000 [thread overview]
Message-ID: <200612010937.08468.andyparkins@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0612010223010.20138@iabervon.org>
On Friday 2006 December 01 08:10, Daniel Barkalow wrote:
> My position on this subject is that "index" is a good name, but that
> description is a terrible description, and "index" is a word that needs a
> good description in context. If we just said up front:
If we need to explain what "index" means in the context of diff then it's not
a good name :-)
An index /everywhere else/ is a lookup table. topic->page number;
author->book title. record id->byte position. There is never any content in
an index, indices just point at content.
I imagine that's how git's index got it's name. (I'm only guessing as I've
not looked at what's actually inside git's "index"). Here's my guess:
git update-index file1 hashes file1, stores it somewhere under that hash and
writes the hash->filename connection to .git/index. That is why git's index
is called an index. It's a hash->filename index.
Unfortunately, "index" in colloquial git actually means the combination
of .git/index plus the hashed file itself. That's no longer an index, it's
a "book". :-)
It's made worse, I think, by the fact that git doesn't want to do any
index-like things with the "index". Being content-oriented rather than
name-oriented means that an entry like "file1->NOTHING" is impossible in git.
This leads to the sort of "git-add means track this filename" confusion that
turns up a lot with new users.
It's probably all too late to change the nomenclature, but I've always been of
the opinion that names are important, they confer meaning. When we use a
common word, with common meaning and deviate from that common meaning we are
bound to create confusion. New users don't have any "git-way-of-thinking"
knowledge when they begin, so when they hear "index" they can only fall back
on their standard understanding of that word. We shouldn't be surprised then
when new users don't get "the index".
Andy
--
Dr Andy Parkins, M Eng (hons), MIEE
next prev parent reply other threads:[~2006-12-01 9:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-30 22:08 [RFC] git-add update with all-0 object Daniel Barkalow
2006-11-30 22:32 ` Johannes Schindelin
2006-11-30 22:34 ` Nicolas Pitre
2006-11-30 22:41 ` Jakub Narebski
2006-11-30 22:49 ` Nicolas Pitre
2006-11-30 22:46 ` Linus Torvalds
2006-12-01 0:12 ` Daniel Barkalow
2006-12-01 4:57 ` Theodore Tso
2006-12-01 6:20 ` Junio C Hamano
2006-12-02 8:55 ` Jakub Narebski
2006-12-01 7:10 ` Linus Torvalds
2006-12-01 8:10 ` Daniel Barkalow
2006-12-01 9:37 ` Andy Parkins [this message]
2006-12-02 8:35 ` Jakub Narebski
2006-12-02 8:26 ` Jakub Narebski
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=200612010937.08468.andyparkins@gmail.com \
--to=andyparkins@gmail.com \
--cc=git@vger.kernel.org \
/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).