This patch makes the documentation refer to the index
as index instead of cache, but some references still
remain. (e.g. git-update-index.txt)
Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Lukas_Sandström19 years agocommitted byJunio C Hamano
show me the differences between HEAD and the current cache
show me the differences between HEAD and the current index
contents (the ones I'd write with a "git-write-tree")
For example, let's say that you have worked on your working directory, updated
some files in the cache and are ready to commit. You want to see eactly
some files in the index and are ready to commit. You want to see eactly
*what* you are going to commit is without having to write a new tree
object and compare it that way, and to do that, you just do
@ -92,7 +92,7 @@ which is obviously a very useful question too, since that tells you what
@@ -92,7 +92,7 @@ which is obviously a very useful question too, since that tells you what
you *could* commit. Again, the output matches the "git-diff-tree -r"
output to a tee, but with a twist.
The twist is that if some file doesn't match the cache, we don't have
The twist is that if some file doesn't match the index, we don't have
a backing store thing for it, and we use the magic "all-zero" sha1 to
show that. So let's say that you have edited `kernel/sched.c`, but
have not actually done a "git-update-index" on it yet - there is no
@ -110,7 +110,7 @@ NOTE: As with other commands of this type, "git-diff-index" does not
@@ -110,7 +110,7 @@ NOTE: As with other commands of this type, "git-diff-index" does not
actually look at the contents of the file at all. So maybe
`kernel/sched.c` hasn't actually changed, and it's just that you
touched it. In either case, it's a note that you need to
"git-upate-cache" it to make the cache be in sync.
"git-upate-index" it to make the index be in sync.
NOTE: You can have a mixture of files show up as "has been updated"
and "is still dirty in the working directory" together. You can always
@ -33,7 +33,7 @@ index file and all SHA1 references in .git/refs/* as heads.
@@ -33,7 +33,7 @@ index file and all SHA1 references in .git/refs/* as heads.
Report tags.
--cache::
Consider any object recorded in the cache also as a head node for
Consider any object recorded in the index also as a head node for
@ -16,7 +16,7 @@ Computes the object ID value for an object with specified type
@@ -16,7 +16,7 @@ Computes the object ID value for an object with specified type
with the contents of the named file (which can be outside of the
work tree), and optionally writes the resulting object into the
object database. Reports its object ID to its standard output.
This is used by "git-cvsimport" to update the cache
This is used by "git-cvsimport" to update the index
without modifying files in the work tree. When <type> is not
@ -44,7 +44,7 @@ When importing incementally, you might need to edit the .git/svn2git file.
@@ -44,7 +44,7 @@ When importing incementally, you might need to edit the .git/svn2git file.
-i::
Import-only: don't perform a checkout after importing. This option
ensures the working directory and cache remain untouched and will
ensures the working directory and index remain untouched and will
@ -131,7 +131,7 @@ actually check in your hard work, you will have to go through two steps:
@@ -131,7 +131,7 @@ actually check in your hard work, you will have to go through two steps:
The first step is trivial: when you want to tell git about any changes
to your working tree, you use the `git-update-index` program. That
program normally just takes a list of filenames you want to update, but
to avoid trivial mistakes, it refuses to add new entries to the cache
to avoid trivial mistakes, it refuses to add new entries to the index
(or remove existing ones) unless you explicitly tell it that you're
adding a new entry with the `\--add` flag (or removing an entry with the
`\--remove`) flag.
@ -199,7 +199,7 @@ was just to show that `git-update-index` did something magical, and
@@ -199,7 +199,7 @@ was just to show that `git-update-index` did something magical, and
actually saved away the contents of your files into the git object
database.
Updating the cache did something else too: it created a `.git/index`
Updating the index did something else too: it created a `.git/index`
file. This is the index that describes your current working tree, and
something you should be very aware of. Again, you normally never worry
about the index file itself, but you should be aware of the fact that
@ -440,7 +440,7 @@ a bit about what you have done.
@@ -440,7 +440,7 @@ a bit about what you have done.
Write whatever message you want, and all the lines that start with '#'
will be pruned out, and the rest will be used as the commit message for
the change. If you decide you don't want to commit anything after all at
this point (you can continue to edit things and update the cache), you
this point (you can continue to edit things and update the index), you
can just leave an empty message. Otherwise `git commit` will commit