git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David Tweed" <david.tweed@gmail.com>
To: "Matthieu Moy" <Matthieu.Moy@imag.fr>
Cc: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Miklos Vajna" <vmiklos@frugalware.org>,
	"Paolo Ciarrocchi" <paolo.ciarrocchi@gmail.com>,
	"Git Mailing List" <git@vger.kernel.org>
Subject: Re: A few usability question about git diff --cached
Date: Fri, 5 Oct 2007 06:22:18 +0100	[thread overview]
Message-ID: <e1dab3980710042222u3e1fc21dtf4b90056fb36eaf0@mail.gmail.com> (raw)
In-Reply-To: <vpqtzp7ndn3.fsf@bauges.imag.fr>

On 10/4/07, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> It makes more sense to me.
>
> For me, a "cache" is a fast-access copy of something, that I can
> rebuild at any time. Cache should be only a matter of performance, if
> the "cache" for an application changes its functionality, it means the
> cache has been too optimistic. Git's index is not that, "git add"
> means "add this to the index", which itself means "put that in the
> list of things to commit", and not "get a copy of that to work faster
> with it".

Just to say this interpretation is also the natural interpretation I
have for the term "cached", and it confused me no end when I was first
learning about git that the index was referred to as a cache. To be
fair, git the documentation was in flux at that time and it's now
referred too as a cache in very few places now.

An example of the kind of thing I have to think carefully about even
now, Junio said in a different mail:

"--cached means work only on the "cached information in index."

If I understand correctly, the term "cached information in index" is
more correctly "stored information in index" (or perhaps more
technically "staged information in index") since there may be
information in there which isn't a cache because it's no longer
present anywhere else (ie, not in a commit yet but also changed in the
working tree).

It's not a big thing, but the usage of cached in git still quite confuses me.

-- 
cheers, dave tweed__________________________
david.tweed@gmail.com
Rm 124, School of Systems Engineering, University of Reading.
"we had no idea that when we added templates we were adding a Turing-
complete compile-time language." -- C++ standardisation committee

  parent reply	other threads:[~2007-10-05  5:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-04 12:27 A few usability question about git diff --cached Paolo Ciarrocchi
2007-10-04 12:54 ` Wincent Colaiuta
2007-10-05  5:59   ` Miles Bader
2007-10-05 10:27     ` Wincent Colaiuta
2007-10-05 10:41       ` Miles Bader
2007-10-04 12:56 ` Miklos Vajna
2007-10-04 13:10   ` Paolo Ciarrocchi
2007-10-04 13:14   ` Junio C Hamano
2007-10-04 13:39     ` Paolo Ciarrocchi
2007-10-04 14:09     ` Wincent Colaiuta
2007-10-04 14:34     ` Johannes Schindelin
2007-10-04 14:40       ` Junio C Hamano
2007-10-04 14:47         ` David Kastrup
2007-10-04 14:44       ` Matthieu Moy
2007-10-04 15:51         ` J. Bruce Fields
2007-10-04 16:02           ` Matthieu Moy
2007-10-04 16:19             ` J. Bruce Fields
2007-10-05  6:40               ` Matthieu Moy
2007-10-05  5:22         ` David Tweed [this message]
2007-10-04 15:49       ` Wincent Colaiuta
2021-08-14 19:31 Court Rankin
2023-01-12 11:54 Mohammed Al-Mahmeed

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=e1dab3980710042222u3e1fc21dtf4b90056fb36eaf0@mail.gmail.com \
    --to=david.tweed@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=Matthieu.Moy@imag.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=paolo.ciarrocchi@gmail.com \
    --cc=vmiklos@frugalware.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).