Skip to content
Snippets Groups Projects
Commit 215a7ad1 authored by Junio C Hamano's avatar Junio C Hamano
Browse files

Big tool rename.


As promised, this is the "big tool rename" patch.  The primary differences
since 0.99.6 are:

  (1) git-*-script are no more.  The commands installed do not
      have any such suffix so users do not have to remember if
      something is implemented as a shell script or not.

  (2) Many command names with 'cache' in them are renamed with
      'index' if that is what they mean.

There are backward compatibility symblic links so that you and
Porcelains can keep using the old names, but the backward
compatibility support  is expected to be removed in the near
future.

Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
parent 99977bd5
No related branches found
No related tags found
No related merge requests found
Showing
with 94 additions and 94 deletions
git-apply
git-build-rev-cache
git-cat-file
git-checkout-cache
git-checkout-index
git-clone-pack
git-commit-tree
git-convert-cache
git-convert-objects
git-daemon
git-diff-cache
git-diff-index
git-diff-files
git-diff-helper
git-diff-stages
git-diff-tree
git-export
git-fetch-pack
git-fsck-cache
git-fsck-objects
git-get-tar-commit-id
git-hash-object
git-http-pull
git-http-fetch
git-init-db
git-local-pull
git-local-fetch
git-ls-files
git-ls-tree
git-merge-base
git-merge-cache
git-merge-index
git-mktag
git-pack-objects
git-patch-id
Loading
Loading
@@ -37,13 +37,13 @@ git-send-pack
git-show-branch
git-show-index
git-show-rev-cache
git-ssh-pull
git-ssh-push
git-ssh-fetch
git-ssh-upload
git-stripspace
git-tar-tree
git-unpack-file
git-unpack-objects
git-update-cache
git-update-index
git-update-server-info
git-upload-pack
git-var
Loading
Loading
The output format from "git-diff-cache", "git-diff-tree" and
The output format from "git-diff-index", "git-diff-tree" and
"git-diff-files" are very similar.
 
These commands all compare two sets of things; what are
compared are different:
 
git-diff-cache <tree-ish>::
git-diff-index <tree-ish>::
compares the <tree-ish> and the files on the filesystem.
 
git-diff-cache --cached <tree-ish>::
git-diff-index --cached <tree-ish>::
compares the <tree-ish> and the cache.
 
git-diff-tree [-r] <tree-ish-1> <tree-ish-2> [<pattern>...]::
Loading
Loading
@@ -58,7 +58,7 @@ Example:
Generating patches with -p
--------------------------
 
When "git-diff-cache", "git-diff-tree", or "git-diff-files" are run
When "git-diff-index", "git-diff-tree", or "git-diff-files" are run
with a '-p' option, they do not produce the output described above;
instead they produce a patch file.
 
Loading
Loading
@@ -77,7 +77,7 @@ The "diff" formatting options can be customized via the
environment variable 'GIT_DIFF_OPTS'. For example, if you
prefer context diff:
 
GIT_DIFF_OPTS=-c git-diff-cache -p $(cat .git/HEAD)
GIT_DIFF_OPTS=-c git-diff-index -p $(cat .git/HEAD)
 
 
2. When the environment variable 'GIT_EXTERNAL_DIFF' is set, the
Loading
Loading
Loading
Loading
@@ -6,7 +6,7 @@ June 2005
Introduction
------------
 
The diff commands git-diff-cache, git-diff-files, and
The diff commands git-diff-index, git-diff-files, and
git-diff-tree can be told to manipulate differences they find
in unconventional ways before showing diff(1) output. The
manipulation is collectively called "diffcore transformation".
Loading
Loading
@@ -21,7 +21,7 @@ The chain of operation
The git-diff-* family works by first comparing two sets of
files:
 
- git-diff-cache compares contents of a "tree" object and the
- git-diff-index compares contents of a "tree" object and the
working directory (when '--cached' flag is not used) or a
"tree" object and the index file (when '--cached' flag is
used);
Loading
Loading
git-add-script(1)
=================
git-add(1)
==========
 
NAME
----
git-add-script - Add files to the cache.
git-add - Add files to the cache.
 
SYNOPSIS
--------
'git-add-script' <file>...
'git-add' <file>...
 
DESCRIPTION
-----------
A simple wrapper to git-update-cache to add files to the cache for people used
A simple wrapper to git-update-index to add files to the cache for people used
to do "cvs add".
 
OPTIONS
Loading
Loading
git-archimport-script(1)
========================
git-archimport(1)
=================
 
NAME
----
git-archimport-script - Import an arch repository into git
git-archimport - Import an arch repository into git
 
 
SYNOPSIS
--------
`git-archimport-script` [--option...] <args>
`git-archimport` [--option...] <args>
 
DESCRIPTION
-----------
Loading
Loading
git-bisect-script(1)
====================
git-bisect(1)
=============
 
NAME
----
git-bisect-script - Find the change that introduced a bug
git-bisect - Find the change that introduced a bug
 
 
SYNOPSIS
Loading
Loading
git-branch-script(1)
====================
git-branch(1)
=============
 
NAME
----
git-branch-script - Create a new branch.
git-branch - Create a new branch.
 
SYNOPSIS
--------
'git-branch-script' [<branchname> [start-point]]
'git-branch' [<branchname> [start-point]]
 
DESCRIPTION
-----------
Loading
Loading
git-checkout-cache(1)
git-checkout-index(1)
=====================
v0.1, May 2005
 
NAME
----
git-checkout-cache - Copy files from the cache to the working directory
git-checkout-index - Copy files from the cache to the working directory
 
 
SYNOPSIS
--------
'git-checkout-cache' [-u] [-q] [-a] [-f] [-n] [--prefix=<string>]
'git-checkout-index' [-u] [-q] [-a] [-f] [-n] [--prefix=<string>]
[--] <file>...
 
DESCRIPTION
Loading
Loading
@@ -46,21 +46,21 @@ OPTIONS
 
Note that the order of the flags matters:
 
git-checkout-cache -a -f file.c
git-checkout-index -a -f file.c
 
will first check out all files listed in the cache (but not overwrite
any old ones), and then force-checkout `file.c` a second time (ie that
one *will* overwrite any old contents with the same filename).
 
Also, just doing "git-checkout-cache" does nothing. You probably meant
"git-checkout-cache -a". And if you want to force it, you want
"git-checkout-cache -f -a".
Also, just doing "git-checkout-index" does nothing. You probably meant
"git-checkout-index -a". And if you want to force it, you want
"git-checkout-index -f -a".
 
Intuitiveness is not the goal here. Repeatability is. The reason for
the "no arguments means no work" thing is that from scripts you are
supposed to be able to do things like:
 
find . -name '*.h' -print0 | xargs -0 git-checkout-cache -f --
find . -name '*.h' -print0 | xargs -0 git-checkout-index -f --
 
which will force all existing `*.h` files to be replaced with their
cached copies. If an empty command line implied "all", then this would
Loading
Loading
@@ -68,7 +68,7 @@ force-refresh everything in the cache, which was not the point.
 
To update and refresh only the files already checked out:
 
git-checkout-cache -n -f -a && git-update-cache --ignore-missing --refresh
git-checkout-index -n -f -a && git-update-index --ignore-missing --refresh
 
Oh, and the "--" is just a good idea when you know the rest will be
filenames. Just so that you wouldn't have a filename of "-a" causing
Loading
Loading
@@ -76,18 +76,18 @@ problems (not possible in the above example, but get used to it in
scripting!).
 
The prefix ability basically makes it trivial to use
git-checkout-cache as an "export as tree" function. Just read the
git-checkout-index as an "export as tree" function. Just read the
desired tree into the index, and do a
git-checkout-cache --prefix=git-export-dir/ -a
git-checkout-index --prefix=git-export-dir/ -a
and git-checkout-cache will "export" the cache into the specified
and git-checkout-index will "export" the cache into the specified
directory.
NOTE The final "/" is important. The exported name is literally just
prefixed with the specified string, so you can also do something like
 
git-checkout-cache --prefix=.merged- Makefile
git-checkout-index --prefix=.merged- Makefile
 
to check out the currently cached copy of `Makefile` into the file
`.merged-Makefile`
Loading
Loading
git-checkout-script(1)
======================
git-checkout(1)
===============
 
NAME
----
git-checkout-script - Checkout and switch to a branch.
git-checkout - Checkout and switch to a branch.
 
SYNOPSIS
--------
'git-checkout-script' [-f] [-b <new_branch>] [<branch>]
'git-checkout' [-f] [-b <new_branch>] [<branch>]
 
DESCRIPTION
-----------
Loading
Loading
git-cherry-pick-script(1)
=========================
git-cherry-pick(1)
==================
v0.99.5 Aug 2005
 
NAME
----
git-cherry-pick-script - Apply the change introduced by an existing commit.
git-cherry-pick - Apply the change introduced by an existing commit.
 
SYNOPSIS
--------
'git-cherry-pick-script' [-n] [-r] <commit>
'git-cherry-pick' [-n] [-r] <commit>
 
DESCRIPTION
-----------
Loading
Loading
git-clone-script(1)
===================
git-clone(1)
============
v0.1, July 2005
 
NAME
----
git-clone-script - Clones a repository.
git-clone - Clones a repository.
 
 
SYNOPSIS
Loading
Loading
git-commit-script(1)
====================
git-commit(1)
=============
v0.99.4, Aug 2005
 
NAME
----
git-commit-script - Record your changes
git-commit - Record your changes
 
SYNOPSIS
--------
Loading
Loading
git-convert-cache(1)
====================
git-convert-objects(1)
======================
v0.1, May 2005
 
NAME
----
git-convert-cache - Converts old-style GIT repository
git-convert-objects - Converts old-style GIT repository
 
 
SYNOPSIS
--------
'git-convert-cache'
'git-convert-objects'
 
DESCRIPTION
-----------
Loading
Loading
git-count-objects-script(1)
===========================
git-count-objects(1)
====================
 
NAME
----
git-count-objects-script - Reports on unpacked objects.
git-count-objects - Reports on unpacked objects.
 
SYNOPSIS
--------
'git-count-objects-script'
'git-count-objects'
 
DESCRIPTION
-----------
Loading
Loading
git-cvsimport-script(1)
=======================
git-cvsimport(1)
================
v0.1, July 2005
 
NAME
----
git-cvsimport-script - Import a CVS repository into git
git-cvsimport - Import a CVS repository into git
 
 
SYNOPSIS
--------
'git-cvsimport-script' [ -o <branch-for-HEAD> ] [ -h ] [ -v ]
'git-cvsimport' [ -o <branch-for-HEAD> ] [ -h ] [ -v ]
[ -d <CVSROOT> ] [ -p <options-for-cvsps> ]
[ -C <GIT_repository> ] [ -i ] [ -k ]
[ -s <subst> ] [ -m ] [ -M regex ] [ <CVS_module> ]
Loading
Loading
Loading
Loading
@@ -16,7 +16,7 @@ DESCRIPTION
Compares the files in the working tree and the cache. When paths
are specified, compares only those named paths. Otherwise all
entries in the cache are compared. The output format is the
same as "git-diff-cache" and "git-diff-tree".
same as "git-diff-index" and "git-diff-tree".
 
OPTIONS
-------
Loading
Loading
Loading
Loading
@@ -13,7 +13,7 @@ SYNOPSIS
 
DESCRIPTION
-----------
Reads output from "git-diff-cache", "git-diff-tree" and "git-diff-files" and
Reads output from "git-diff-index", "git-diff-tree" and "git-diff-files" and
generates patch format output.
 
OPTIONS
Loading
Loading
@@ -35,7 +35,7 @@ OPTIONS
 
See Also
--------
The section on generating patches in link:git-diff-cache.html[git-diff-cache]
The section on generating patches in link:git-diff-index.html[git-diff-index]
 
 
Author
Loading
Loading
git-diff-cache(1)
git-diff-index(1)
=================
v0.1, May 2005
 
NAME
----
git-diff-cache - Compares content and mode of blobs between the cache and repository
git-diff-index - Compares content and mode of blobs between the cache and repository
 
 
SYNOPSIS
--------
'git-diff-cache' [-m] [--cached] [<common diff options>] <tree-ish> [<path>...]
'git-diff-index' [-m] [--cached] [<common diff options>] <tree-ish> [<path>...]
 
DESCRIPTION
-----------
Loading
Loading
@@ -32,7 +32,7 @@ include::diff-options.txt[]
-m::
By default, files recorded in the index but not checked
out are reported as deleted. This flag makes
"git-diff-cache" say that all non-checked-out files are up
"git-diff-index" say that all non-checked-out files are up
to date.
 
Output format
Loading
Loading
@@ -58,24 +58,24 @@ some files in the cache 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
 
git-diff-cache --cached $(cat .git/HEAD)
git-diff-index --cached $(cat .git/HEAD)
 
Example: let's say I had renamed `commit.c` to `git-commit.c`, and I had
done an "git-update-cache" to make that effective in the index file.
done an "git-update-index" to make that effective in the index file.
"git-diff-files" wouldn't show anything at all, since the index file
matches my working directory. But doing a "git-diff-cache" does:
matches my working directory. But doing a "git-diff-index" does:
 
torvalds@ppc970:~/git> git-diff-cache --cached $(cat .git/HEAD)
torvalds@ppc970:~/git> git-diff-index --cached $(cat .git/HEAD)
-100644 blob 4161aecc6700a2eb579e842af0b7f22b98443f74 commit.c
+100644 blob 4161aecc6700a2eb579e842af0b7f22b98443f74 git-commit.c
 
You can trivially see that the above is a rename.
 
In fact, "git-diff-cache --cached" *should* always be entirely equivalent to
In fact, "git-diff-index --cached" *should* always be entirely equivalent to
actually doing a "git-write-tree" and comparing that. Except this one is much
nicer for the case where you just want to check where you are.
 
So doing a "git-diff-cache --cached" is basically very useful when you are
So doing a "git-diff-index --cached" is basically very useful when you are
asking yourself "what have I already marked for being committed, and
what's the difference to a previous tree".
 
Loading
Loading
@@ -96,10 +96,10 @@ output to a tee, but with a twist.
The twist is that if some file doesn't match the cache, 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-cache" on it yet - there is no
have not actually done a "git-update-index" on it yet - there is no
"object" associated with the new state, and you get:
 
torvalds@ppc970:~/v2.6/linux> git-diff-cache $(cat .git/HEAD )
torvalds@ppc970:~/v2.6/linux> git-diff-index $(cat .git/HEAD )
*100644->100664 blob 7476bb......->000000...... kernel/sched.c
 
ie it shows that the tree has changed, and that `kernel/sched.c` has is
Loading
Loading
@@ -107,7 +107,7 @@ not up-to-date and may contain new stuff. The all-zero sha1 means that to
get the real diff, you need to look at the object in the working directory
directly rather than do an object-to-object diff.
 
NOTE! As with other commands of this type, "git-diff-cache" does not
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
Loading
Loading
Loading
Loading
@@ -93,7 +93,7 @@ so it can be used to name subdirectories.
An example of normal usage is:
 
torvalds@ppc970:~/git> git-diff-tree 5319e4......
*100664->100664 blob ac348b.......->a01513....... git-fsck-cache.c
*100664->100664 blob ac348b.......->a01513....... git-fsck-objects.c
 
which tells you that the last commit changed just one file (it's from
this one:
Loading
Loading
@@ -104,7 +104,7 @@ this one:
author Linus Torvalds <torvalds@ppc970.osdl.org> Sat Apr 9 12:02:30 2005
committer Linus Torvalds <torvalds@ppc970.osdl.org> Sat Apr 9 12:02:30 2005
 
Make "git-fsck-cache" print out all the root commits it finds.
Make "git-fsck-objects" print out all the root commits it finds.
 
Once I do the reference tracking, I'll also make it print out all the
HEAD commits it finds, which is even more interesting.
Loading
Loading
git-diff-script(1)
==================
git-diff(1)
===========
 
NAME
----
git-diff-script - Some git command not yet documented.
git-diff - Some git command not yet documented.
 
 
SYNOPSIS
--------
'git-diff-script' [ --option ] <args>...
'git-diff' [ --option ] <args>...
 
DESCRIPTION
-----------
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment