summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3cab359)
raw | patch | inline | side by side (parent: 3cab359)
author | Lukas_Sandström <lukass@etek.chalmers.se> | |
Fri, 11 Nov 2005 01:12:27 +0000 (02:12 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 11 Nov 2005 23:12:29 +0000 (15:12 -0800) |
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>
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>
17 files changed:
index d1d0d2d3dc8760a8030313de3dd14a942d0fc2bf..b426a14f5e5fa29bfdb8f026d995dc182930073d 100644 (file)
compares the <tree-ish> and the files on the filesystem.
git-diff-index --cached <tree-ish>::
- compares the <tree-ish> and the cache.
+ compares the <tree-ish> and the index.
git-diff-tree [-r] <tree-ish-1> <tree-ish-2> [<pattern>...]::
compares the trees named by the two arguments.
git-diff-files [<pattern>...]::
- compares the cache and the files on the filesystem.
+ compares the index and the files on the filesystem.
An output line is formatted this way:
. an LF or a NUL when '-z' option is used, to terminate the record.
<sha1> is shown as all 0's if a file is new on the filesystem
-and it is out of sync with the cache.
+and it is out of sync with the index.
Example:
The file parameters can point at the user's working file
(e.g. `new-file` in "git-diff-files"), `/dev/null` (e.g. `old-file`
when a new file is added), or a temporary file (e.g. `old-file` in the
-cache). 'GIT_EXTERNAL_DIFF' should not worry about unlinking the
+index). 'GIT_EXTERNAL_DIFF' should not worry about unlinking the
temporary file --- it is removed when 'GIT_EXTERNAL_DIFF' exits.
For a path that is unmerged, 'GIT_EXTERNAL_DIFF' is called with 1
index 32005b03f3bee40413d7ff0d33e143de85b194c6..8eef86e474aee14bb6743f0f81d6aa802ef8a621 100644 (file)
<orderfile>, which has one shell glob pattern per line.
-R::
- Swap two inputs; that is, show differences from cache or
+ Swap two inputs; that is, show differences from index or
on-disk file to tree contents.
For more detailed explanation on these common options, see also
index 589dc9ad12943767c73658904d54a574d6592f54..94b283a6bf55bcbce4eefc63d133ada833f38c28 100644 (file)
NAME
----
-git-checkout-index - Copy files from the cache to the working directory
+git-checkout-index - Copy files from the index to the working directory
SYNOPSIS
DESCRIPTION
-----------
-Will copy all files listed from the cache to the working directory
+Will copy all files listed from the index to the working directory
(not overwriting existing files).
OPTIONS
-------
-u::
update stat information for the checked out entries in
- the cache file.
+ the index file.
-q::
- be quiet if files exist or are not in the cache
+ be quiet if files exist or are not in the index
-f::
forces overwrite of existing files
-a::
- checks out all files in the cache. Cannot be used
+ checks out all files in the index. Cannot be used
together with explicit filenames.
-n::
which will force all existing `*.h` files to be replaced with their
cached copies. If an empty command line implied "all", then this would
-force-refresh everything in the cache, which was not the point.
+force-refresh everything in the index, which was not the point.
To update and refresh only the files already checked out:
git-checkout-index --prefix=git-export-dir/ -a
-and git-checkout-index will "export" the cache into the specified
+and git-checkout-index will "export" the index into the specified
directory.
NOTE The final "/" is important. The exported name is literally just
index 4b62256a79034c4dcd60e2954e7f5c1b7f3caa81..88bd3b0f173bf9e153746fc56e4be44a2d337828 100644 (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
not create them if they do not exist.
-k::
index e3873888f2236acb3ac04a6cda3784d61a2ce1a2..3b04bfeec6ad18edffd9b6d44709a10fdda36b8c 100644 (file)
NAME
----
-git-diff-files - Compares files in the working tree and the cache
+git-diff-files - Compares files in the working tree and the index
SYNOPSIS
DESCRIPTION
-----------
-Compares the files in the working tree and the cache. When paths
+Compares the files in the working tree and the index. When paths
are specified, compares only those named paths. Otherwise all
-entries in the cache are compared. The output format is the
+entries in the index are compared. The output format is the
same as "git-diff-index" and "git-diff-tree".
OPTIONS
index 2fc3eed710dbfeda8911097a8b5f493a220e5f3c..d8fc78fab94d73fe32808cbfaaf4fcfc3efe9694 100644 (file)
NAME
----
-git-diff-index - Compares content and mode of blobs between the cache and repository
+git-diff-index - Compares content and mode of blobs between the index and repository
SYNOPSIS
DESCRIPTION
-----------
Compares the content and mode of the blobs found via a tree
-object with the content of the current cache and, optionally
+object with the content of the current index and, optionally
ignoring the stat state of the file on disk. When paths are
specified, compares only those named paths. Otherwise all
-entries in the cache are compared.
+entries in the index are compared.
OPTIONS
-------
-----------
If '--cached' is specified, it allows you to ask:
- 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
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
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
index 5dc9dbdd78af931e7c0a69d2b2425287e0614687..37e8055d2141a6893991201c628bc07549c04b27 100644 (file)
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
an unreachability trace.
--standalone::
used to specify the object database root (usually $GIT_DIR/objects)
GIT_INDEX_FILE::
- used to specify the index file of the cache
+ used to specify the index file of the index
GIT_ALTERNATE_OBJECT_DIRECTORIES::
used to specify additional object database roots (usually unset)
index 9239f11135d849ff0411e9ebef21ed8b1c83afd6..07d2c427c5d5364e4a1aad6ffa437361cc8f99ed 100644 (file)
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
specified, it defaults to "blob".
index 8c1784d2e3f982c405863e8f79695bb92145a5f5..2f308ecda9d039224d2714e4cfd209422605430f 100644 (file)
NAME
----
-git-ls-files - Information about files in the cache/working directory
+git-ls-files - Information about files in the index/working directory
SYNOPSIS
index d072fdaa4f74a6508abcae17001b1321c73bb000..60306429fb7cad45e063cef8f70fc79005df7f70 100644 (file)
DESCRIPTION
-----------
-This looks up the <file>(s) in the cache and, if there are any merge
+This looks up the <file>(s) in the index and, if there are any merge
entries, passes the SHA1 hash for those files as arguments 1, 2, 3 (empty
argument if no file), and <file> as argument 4. File modes for the three
files are passed as arguments 5, 6 and 7.
Interpret all following arguments as filenames.
-a::
- Run merge against all files in the cache that need merging.
+ Run merge against all files in the index that need merging.
-o::
Instead of stopping at the first failed merge, do all of them
index 7db5fb579597373128c9cbb44ef02adf5e9da8a0..e219c6a78896f68f4720b189aa89514e7e108fb3 100644 (file)
NAME
----
-git-read-tree - Reads tree information into the directory cache
+git-read-tree - Reads tree information into the index
SYNOPSIS
DESCRIPTION
-----------
-Reads the tree information given by <tree-ish> into the directory cache,
+Reads the tree information given by <tree-ish> into the index,
but does not actually *update* any of the files it "caches". (see:
git-checkout-index)
-Optionally, it can merge a tree into the cache, perform a
+Optionally, it can merge a tree into the index, perform a
fast-forward (i.e. 2-way) merge, or a 3-way merge, with the -m
flag. When used with -m, the -u flag causes it to also update
the files in the work tree with the result of the merge.
Single Tree Merge
~~~~~~~~~~~~~~~~~
If only 1 tree is specified, git-read-tree operates as if the user did not
-specify '-m', except that if the original cache has an entry for a
+specify '-m', except that if the original index has an entry for a
given pathname, and the contents of the path matches with the tree
-being read, the stat info from the cache is used. (In other words, the
-cache's stat()s take precedence over the merged tree's).
+being read, the stat info from the index is used. (In other words, the
+index's stat()s take precedence over the merged tree's).
That means that if you do a "git-read-tree -m <newtree>" followed by a
"git-checkout-index -f -u -a", the "git-checkout-index" only checks out
-------------------------------------------------------
0 nothing nothing nothing (does not happen)
1 nothing nothing exists use M
- 2 nothing exists nothing remove path from cache
+ 2 nothing exists nothing remove path from index
3 nothing exists exists use M
clean I==H I==M
8 yes N/A no nothing exists fail
9 no N/A no nothing exists fail
- 10 yes yes N/A exists nothing remove path from cache
+ 10 yes yes N/A exists nothing remove path from index
11 no yes N/A exists nothing fail
12 yes no N/A exists nothing fail
13 no no N/A exists nothing fail
20 yes yes no exists exists use M
21 no yes no exists exists fail
-In all "keep index" cases, the cache entry stays as in the
+In all "keep index" cases, the index entry stays as in the
original index file. If the entry were not up to date,
git-read-tree keeps the copy in the work tree intact when
operating under the -u flag.
Your work tree is still based on your HEAD ($JC), but you have
some edits since. Three-way merge makes sure that you have not
-added or modified cache entries since $JC, and if you haven't,
+added or modified index entries since $JC, and if you haven't,
then does the right thing. So with the following sequence:
$ git-read-tree -m -u `git-merge-base $JC $LT` $JC $LT
index 88bdc08eb41ddb8670dcf983b3c4cb714258a9f1..fcc79fa93a18444e5df42bc9e98bb18fe4b55ce5 100644 (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
not create them if they do not exist.
-t <trunk_subdir>::
index 58b9e49af5f269f59b6e884430322cfca8673c75..52874c85623cd50f94219243cce4fbf61a4f2331 100644 (file)
DESCRIPTION
-----------
Modifies the index or directory cache. Each file mentioned is updated
-into the cache and any 'unmerged' or 'needs updating' state is
+into the index and any 'unmerged' or 'needs updating' state is
cleared.
The way "git-update-index" handles files it is told about can be modified
OPTIONS
-------
--add::
- If a specified file isn't in the cache already then it's
+ If a specified file isn't in the index already then it's
added.
Default behaviour is to ignore new files.
--remove::
- If a specified file is in the cache but is missing then it's
+ If a specified file is in the index but is missing then it's
removed.
Default behaviour is to ignore removed file.
--refresh::
- Looks at the current cache and checks to see if merges or
+ Looks at the current index and checks to see if merges or
updates are needed by checking stat() information.
-q::
- Quiet. If --refresh finds that the cache needs an update, the
+ Quiet. If --refresh finds that the index needs an update, the
default behavior is to error out. This option makes
git-update-index continue anyway.
--unmerged::
- If --refresh finds unmerged changes in the cache, the default
+ If --refresh finds unmerged changes in the index, the default
behavior is to error out. This option makes git-update-index
continue anyway.
Ignores missing files during a --refresh
--cacheinfo <mode> <object> <path>::
- Directly insert the specified info into the cache.
+ Directly insert the specified info into the index.
--index-info::
Read index info from stdin.
--info-only::
Do not create objects in the object database for all
<file> arguments that follow this flag; just insert
- their object IDs into the cache.
+ their object IDs into the index.
--force-remove::
Remove the file from the index even when the working directory
Using --refresh
---------------
-'--refresh' does not calculate a new sha1 file or bring the cache
+'--refresh' does not calculate a new sha1 file or bring the index
up-to-date for mode/content changes. But what it *does* do is to
-"re-match" the stat information of a file with the cache, so that you
-can refresh the cache for a file that hasn't been changed but where
+"re-match" the stat information of a file with the index, so that you
+can refresh the index for a file that hasn't been changed but where
the stat entry is out of date.
For example, you'd want to do this after doing a "git-read-tree", to link
-up the stat cache details with the proper files.
+up the stat index details with the proper files.
Using --cacheinfo or --info-only
--------------------------------
index 51be44d1f24cb3195fa1784b2f29b7c6f9392708..abee05f6f53fe38b77caf9a19194c6f0990690bd 100644 (file)
NAME
----
-git-write-tree - Creates a tree object from the current cache
+git-write-tree - Creates a tree object from the current index
SYNOPSIS
DESCRIPTION
-----------
-Creates a tree object using the current cache.
+Creates a tree object using the current index.
-The cache must be merged.
+The index must be merged.
-Conceptually, "git-write-tree" sync()s the current directory cache contents
+Conceptually, "git-write-tree" sync()s the current index contents
into a set of tree files.
In order to have that match what is actually in your directory right
now, you need to have done a "git-update-index" phase before you did the
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 2f9622f5ac492140427e752ebd163cb22d003d8d..b7bc4fb2315ae2465f456c33e6ebe1ee0da2ee70 100644 (file)
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
Commands Overview
-----------------
The git commands can helpfully be split into those that manipulate
-the repository, the cache and the working fileset, those that
+the repository, the index and the working fileset, those that
interrogate and compare them, and those that moves objects and
references between repositories.
applies it to the working tree.
gitlink:git-checkout-index[1]::
- Copy files from the cache to the working directory
+ Copy files from the index to the working directory
gitlink:git-commit-tree[1]::
Creates a new commit object
Remove extra objects that are already in pack files.
gitlink:git-read-tree[1]::
- Reads tree information into the directory cache
+ Reads tree information into the directory index
gitlink:git-unpack-objects[1]::
Unpacks objects out of a packed archive.
Modifies the index or directory cache
gitlink:git-write-tree[1]::
- Creates a tree from the current cache
+ Creates a tree from the current index
Interrogation commands
Provide content or type information for repository objects
gitlink:git-diff-index[1]::
- Compares content and mode of blobs between the cache and repository
+ Compares content and mode of blobs between the index and repository
gitlink:git-diff-files[1]::
- Compares files in the working tree and the cache
+ Compares files in the working tree and the index
gitlink:git-diff-stages[1]::
Compares two "merge stages" in the index file.
Verifies the connectivity and validity of the objects in the database
gitlink:git-ls-files[1]::
- Information about files in the cache/working directory
+ Information about files in the index/working directory
gitlink:git-ls-tree[1]::
Displays a tree object in human readable form
'GIT_INDEX_FILE'::
This environment allows the specification of an alternate
- cache/index file. If not specified, the default of
- `$GIT_DIR/index` is used.
+ index file. If not specified, the default of `$GIT_DIR/index`
+ is used.
'GIT_OBJECT_DIRECTORY'::
If the object storage directory is specified via this
index eb7b4710246c627d178c518d39c565ce48a02f02..07df6b48be0aab9c711905a3109d90c7567cca3e 100644 (file)
index::
A collection of files with stat information, whose contents are
- stored as objects. The cache is a stored version of your working
+ stored as objects. The index is a stored version of your working
tree. Truth be told, it can also contain a second, and even a third
version of a working tree, which are used when merging.
index entry::
The information regarding a particular file, stored in the index.
An index entry can be unmerged, if a merge was started, but not
- yet finished (i.e. if the cache contains multiple versions of
+ yet finished (i.e. if the index contains multiple versions of
that file).
unmerged index:
stored in the object database.
commit::
- As a verb: The action of storing the current state of the cache in the
+ As a verb: The action of storing the current state of the index in the
object database. The result is a revision.
As a noun: Short hand for commit object.
index 95ed852f2638dc53a0807185da3e12b45fc3d3a1..03eb4216f3b2d5de3909da4480708858ad99a09a 100644 (file)
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.
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
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
the change for you.