@matheusbsbs / matheus-bagliano / commits / 215a7ad1ef
Fork 0

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: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Sep 7, 2005 at 17:26 UTC 215a7ad1ef790467a4cd3f0dcffbd6e5f04c38f7
160 files changed +1023 -915
.gitignore
+10 -10
@@ -1,28 +1,28 @@
1 git-apply
2 git-build-rev-cache
3 git-cat-file
4 -git-checkout-cache
4 +git-checkout-index
5 git-clone-pack
6 git-commit-tree
7 -git-convert-cache
7 +git-convert-objects
8 git-daemon
9 -git-diff-cache
9 +git-diff-index
10 git-diff-files
11 git-diff-helper
12 git-diff-stages
13 git-diff-tree
14 git-export
15 git-fetch-pack
16 -git-fsck-cache
16 +git-fsck-objects
17 git-get-tar-commit-id
18 git-hash-object
19 -git-http-pull
19 +git-http-fetch
20 git-init-db
21 -git-local-pull
21 +git-local-fetch
22 git-ls-files
23 git-ls-tree
24 git-merge-base
25 -git-merge-cache
25 +git-merge-index
26 git-mktag
27 git-pack-objects
28 git-patch-id
@@ -37,13 +37,13 @@ git-send-pack
37 git-show-branch
38 git-show-index
39 git-show-rev-cache
40 -git-ssh-pull
41 -git-ssh-push
40 +git-ssh-fetch
41 +git-ssh-upload
42 git-stripspace
43 git-tar-tree
44 git-unpack-file
45 git-unpack-objects
46 -git-update-cache
46 +git-update-index
47 git-update-server-info
48 git-upload-pack
49 git-var
Documentation/diff-format.txt
+5 -5
@@ -1,13 +1,13 @@
1 -The output format from "git-diff-cache", "git-diff-tree" and
1 +The output format from "git-diff-index", "git-diff-tree" and
2 "git-diff-files" are very similar.
3
4 These commands all compare two sets of things; what are
5 compared are different:
6
7 -git-diff-cache <tree-ish>::
7 +git-diff-index <tree-ish>::
8 compares the <tree-ish> and the files on the filesystem.
9
10 -git-diff-cache --cached <tree-ish>::
10 +git-diff-index --cached <tree-ish>::
11 compares the <tree-ish> and the cache.
12
13 git-diff-tree [-r] <tree-ish-1> <tree-ish-2> [<pattern>...]::
@@ -58,7 +58,7 @@ Example:
58 Generating patches with -p
59 --------------------------
60
61 -When "git-diff-cache", "git-diff-tree", or "git-diff-files" are run
61 +When "git-diff-index", "git-diff-tree", or "git-diff-files" are run
62 with a '-p' option, they do not produce the output described above;
63 instead they produce a patch file.
64
@@ -77,7 +77,7 @@ The "diff" formatting options can be customized via the
77 environment variable 'GIT_DIFF_OPTS'. For example, if you
78 prefer context diff:
79
80 - GIT_DIFF_OPTS=-c git-diff-cache -p $(cat .git/HEAD)
80 + GIT_DIFF_OPTS=-c git-diff-index -p $(cat .git/HEAD)
81
82
83 2. When the environment variable 'GIT_EXTERNAL_DIFF' is set, the
Documentation/diffcore.txt
+2 -2
@@ -6,7 +6,7 @@ June 2005
6 Introduction
7 ------------
8
9 -The diff commands git-diff-cache, git-diff-files, and
9 +The diff commands git-diff-index, git-diff-files, and
10 git-diff-tree can be told to manipulate differences they find
11 in unconventional ways before showing diff(1) output. The
12 manipulation is collectively called "diffcore transformation".
@@ -21,7 +21,7 @@ The chain of operation
21 The git-diff-* family works by first comparing two sets of
22 files:
23
24 - - git-diff-cache compares contents of a "tree" object and the
24 + - git-diff-index compares contents of a "tree" object and the
25 working directory (when '--cached' flag is not used) or a
26 "tree" object and the index file (when '--cached' flag is
27 used);
Documentation/git-add.txt renamed
+5 -5
@@ -1,17 +1,17 @@
1 -git-add-script(1)
2 -=================
1 +git-add(1)
2 +==========
3
4 NAME
5 ----
6 -git-add-script - Add files to the cache.
6 +git-add - Add files to the cache.
7
8 SYNOPSIS
9 --------
10 -'git-add-script' <file>...
10 +'git-add' <file>...
11
12 DESCRIPTION
13 -----------
14 -A simple wrapper to git-update-cache to add files to the cache for people used
14 +A simple wrapper to git-update-index to add files to the cache for people used
15 to do "cvs add".
16
17 OPTIONS
Documentation/git-archimport.txt renamed
+4 -4
@@ -1,14 +1,14 @@
1 -git-archimport-script(1)
2 -========================
1 +git-archimport(1)
2 +=================
3
4 NAME
5 ----
6 -git-archimport-script - Import an arch repository into git
6 +git-archimport - Import an arch repository into git
7
8
9 SYNOPSIS
10 --------
11 -`git-archimport-script` [--option...] <args>
11 +`git-archimport` [--option...] <args>
12
13 DESCRIPTION
14 -----------
Documentation/git-bisect.txt renamed
+3 -3
@@ -1,9 +1,9 @@
1 -git-bisect-script(1)
2 -====================
1 +git-bisect(1)
2 +=============
3
4 NAME
5 ----
6 -git-bisect-script - Find the change that introduced a bug
6 +git-bisect - Find the change that introduced a bug
7
8
9 SYNOPSIS
Documentation/git-branch.txt renamed
+4 -4
@@ -1,13 +1,13 @@
1 -git-branch-script(1)
2 -====================
1 +git-branch(1)
2 +=============
3
4 NAME
5 ----
6 -git-branch-script - Create a new branch.
6 +git-branch - Create a new branch.
7
8 SYNOPSIS
9 --------
10 -'git-branch-script' [<branchname> [start-point]]
10 +'git-branch' [<branchname> [start-point]]
11
12 DESCRIPTION
13 -----------
Documentation/git-checkout-index.txt renamed
+13 -13
@@ -1,15 +1,15 @@
1 -git-checkout-cache(1)
1 +git-checkout-index(1)
2 =====================
3 v0.1, May 2005
4
5 NAME
6 ----
7 -git-checkout-cache - Copy files from the cache to the working directory
7 +git-checkout-index - Copy files from the cache to the working directory
8
9
10 SYNOPSIS
11 --------
12 -'git-checkout-cache' [-u] [-q] [-a] [-f] [-n] [--prefix=<string>]
12 +'git-checkout-index' [-u] [-q] [-a] [-f] [-n] [--prefix=<string>]
13 [--] <file>...
14
15 DESCRIPTION
@@ -46,21 +46,21 @@ OPTIONS
46
47 Note that the order of the flags matters:
48
49 - git-checkout-cache -a -f file.c
49 + git-checkout-index -a -f file.c
50
51 will first check out all files listed in the cache (but not overwrite
52 any old ones), and then force-checkout `file.c` a second time (ie that
53 one *will* overwrite any old contents with the same filename).
54
55 -Also, just doing "git-checkout-cache" does nothing. You probably meant
56 -"git-checkout-cache -a". And if you want to force it, you want
57 -"git-checkout-cache -f -a".
55 +Also, just doing "git-checkout-index" does nothing. You probably meant
56 +"git-checkout-index -a". And if you want to force it, you want
57 +"git-checkout-index -f -a".
58
59 Intuitiveness is not the goal here. Repeatability is. The reason for
60 the "no arguments means no work" thing is that from scripts you are
61 supposed to be able to do things like:
62
63 - find . -name '*.h' -print0 | xargs -0 git-checkout-cache -f --
63 + find . -name '*.h' -print0 | xargs -0 git-checkout-index -f --
64
65 which will force all existing `*.h` files to be replaced with their
66 cached copies. If an empty command line implied "all", then this would
@@ -68,7 +68,7 @@ force-refresh everything in the cache, which was not the point.
68
69 To update and refresh only the files already checked out:
70
71 - git-checkout-cache -n -f -a && git-update-cache --ignore-missing --refresh
71 + git-checkout-index -n -f -a && git-update-index --ignore-missing --refresh
72
73 Oh, and the "--" is just a good idea when you know the rest will be
74 filenames. Just so that you wouldn't have a filename of "-a" causing
@@ -76,18 +76,18 @@ problems (not possible in the above example, but get used to it in
76 scripting!).
77
78 The prefix ability basically makes it trivial to use
79 -git-checkout-cache as an "export as tree" function. Just read the
79 +git-checkout-index as an "export as tree" function. Just read the
80 desired tree into the index, and do a
81
82 - git-checkout-cache --prefix=git-export-dir/ -a
82 + git-checkout-index --prefix=git-export-dir/ -a
83
84 -and git-checkout-cache will "export" the cache into the specified
84 +and git-checkout-index will "export" the cache into the specified
85 directory.
86
87 NOTE The final "/" is important. The exported name is literally just
88 prefixed with the specified string, so you can also do something like
89
90 - git-checkout-cache --prefix=.merged- Makefile
90 + git-checkout-index --prefix=.merged- Makefile
91
92 to check out the currently cached copy of `Makefile` into the file
93 `.merged-Makefile`
Documentation/git-checkout.txt renamed
+4 -4
@@ -1,13 +1,13 @@
1 -git-checkout-script(1)
2 -======================
1 +git-checkout(1)
2 +===============
3
4 NAME
5 ----
6 -git-checkout-script - Checkout and switch to a branch.
6 +git-checkout - Checkout and switch to a branch.
7
8 SYNOPSIS
9 --------
10 -'git-checkout-script' [-f] [-b <new_branch>] [<branch>]
10 +'git-checkout' [-f] [-b <new_branch>] [<branch>]
11
12 DESCRIPTION
13 -----------
Documentation/git-cherry-pick.txt renamed
+4 -4
@@ -1,14 +1,14 @@
1 -git-cherry-pick-script(1)
2 -=========================
1 +git-cherry-pick(1)
2 +==================
3 v0.99.5 Aug 2005
4
5 NAME
6 ----
7 -git-cherry-pick-script - Apply the change introduced by an existing commit.
7 +git-cherry-pick - Apply the change introduced by an existing commit.
8
9 SYNOPSIS
10 --------
11 -'git-cherry-pick-script' [-n] [-r] <commit>
11 +'git-cherry-pick' [-n] [-r] <commit>
12
13 DESCRIPTION
14 -----------
Documentation/git-clone.txt renamed
+3 -3
@@ -1,10 +1,10 @@
1 -git-clone-script(1)
2 -===================
1 +git-clone(1)
2 +============
3 v0.1, July 2005
4
5 NAME
6 ----
7 -git-clone-script - Clones a repository.
7 +git-clone - Clones a repository.
8
9
10 SYNOPSIS
Documentation/git-commit.txt renamed
+3 -3
@@ -1,10 +1,10 @@
1 -git-commit-script(1)
2 -====================
1 +git-commit(1)
2 +=============
3 v0.99.4, Aug 2005
4
5 NAME
6 ----
7 -git-commit-script - Record your changes
7 +git-commit - Record your changes
8
9 SYNOPSIS
10 --------
Documentation/git-convert-objects.txt renamed
+4 -4
@@ -1,15 +1,15 @@
1 -git-convert-cache(1)
2 -====================
1 +git-convert-objects(1)
2 +======================
3 v0.1, May 2005
4
5 NAME
6 ----
7 -git-convert-cache - Converts old-style GIT repository
7 +git-convert-objects - Converts old-style GIT repository
8
9
10 SYNOPSIS
11 --------
12 -'git-convert-cache'
12 +'git-convert-objects'
13
14 DESCRIPTION
15 -----------
Documentation/git-count-objects.txt renamed
+4 -4
@@ -1,13 +1,13 @@
1 -git-count-objects-script(1)
2 -===========================
1 +git-count-objects(1)
2 +====================
3
4 NAME
5 ----
6 -git-count-objects-script - Reports on unpacked objects.
6 +git-count-objects - Reports on unpacked objects.
7
8 SYNOPSIS
9 --------
10 -'git-count-objects-script'
10 +'git-count-objects'
11
12 DESCRIPTION
13 -----------
Documentation/git-cvsimport.txt renamed
+4 -4
@@ -1,15 +1,15 @@
1 -git-cvsimport-script(1)
2 -=======================
1 +git-cvsimport(1)
2 +================
3 v0.1, July 2005
4
5 NAME
6 ----
7 -git-cvsimport-script - Import a CVS repository into git
7 +git-cvsimport - Import a CVS repository into git
8
9
10 SYNOPSIS
11 --------
12 -'git-cvsimport-script' [ -o <branch-for-HEAD> ] [ -h ] [ -v ]
12 +'git-cvsimport' [ -o <branch-for-HEAD> ] [ -h ] [ -v ]
13 [ -d <CVSROOT> ] [ -p <options-for-cvsps> ]
14 [ -C <GIT_repository> ] [ -i ] [ -k ]
15 [ -s <subst> ] [ -m ] [ -M regex ] [ <CVS_module> ]
Documentation/git-diff-files.txt
+1 -1
@@ -16,7 +16,7 @@ DESCRIPTION
16 Compares the files in the working tree and the cache. When paths
17 are specified, compares only those named paths. Otherwise all
18 entries in the cache are compared. The output format is the
19 -same as "git-diff-cache" and "git-diff-tree".
19 +same as "git-diff-index" and "git-diff-tree".
20
21 OPTIONS
22 -------
Documentation/git-diff-helper.txt
+2 -2
@@ -13,7 +13,7 @@ SYNOPSIS
13
14 DESCRIPTION
15 -----------
16 -Reads output from "git-diff-cache", "git-diff-tree" and "git-diff-files" and
16 +Reads output from "git-diff-index", "git-diff-tree" and "git-diff-files" and
17 generates patch format output.
18
19 OPTIONS
@@ -35,7 +35,7 @@ OPTIONS
35
36 See Also
37 --------
38 -The section on generating patches in link:git-diff-cache.html[git-diff-cache]
38 +The section on generating patches in link:git-diff-index.html[git-diff-index]
39
40
41 Author
Documentation/git-diff-index.txt renamed
+13 -13
@@ -1,15 +1,15 @@
1 -git-diff-cache(1)
1 +git-diff-index(1)
2 =================
3 v0.1, May 2005
4
5 NAME
6 ----
7 -git-diff-cache - Compares content and mode of blobs between the cache and repository
7 +git-diff-index - Compares content and mode of blobs between the cache and repository
8
9
10 SYNOPSIS
11 --------
12 -'git-diff-cache' [-m] [--cached] [<common diff options>] <tree-ish> [<path>...]
12 +'git-diff-index' [-m] [--cached] [<common diff options>] <tree-ish> [<path>...]
13
14 DESCRIPTION
15 -----------
@@ -32,7 +32,7 @@ include::diff-options.txt[]
32 -m::
33 By default, files recorded in the index but not checked
34 out are reported as deleted. This flag makes
35 - "git-diff-cache" say that all non-checked-out files are up
35 + "git-diff-index" say that all non-checked-out files are up
36 to date.
37
38 Output format
@@ -58,24 +58,24 @@ some files in the cache and are ready to commit. You want to see eactly
58 *what* you are going to commit is without having to write a new tree
59 object and compare it that way, and to do that, you just do
60
61 - git-diff-cache --cached $(cat .git/HEAD)
61 + git-diff-index --cached $(cat .git/HEAD)
62
63 Example: let's say I had renamed `commit.c` to `git-commit.c`, and I had
64 -done an "git-update-cache" to make that effective in the index file.
64 +done an "git-update-index" to make that effective in the index file.
65 "git-diff-files" wouldn't show anything at all, since the index file
66 -matches my working directory. But doing a "git-diff-cache" does:
66 +matches my working directory. But doing a "git-diff-index" does:
67
68 - torvalds@ppc970:~/git> git-diff-cache --cached $(cat .git/HEAD)
68 + torvalds@ppc970:~/git> git-diff-index --cached $(cat .git/HEAD)
69 -100644 blob 4161aecc6700a2eb579e842af0b7f22b98443f74 commit.c
70 +100644 blob 4161aecc6700a2eb579e842af0b7f22b98443f74 git-commit.c
71
72 You can trivially see that the above is a rename.
73
74 -In fact, "git-diff-cache --cached" *should* always be entirely equivalent to
74 +In fact, "git-diff-index --cached" *should* always be entirely equivalent to
75 actually doing a "git-write-tree" and comparing that. Except this one is much
76 nicer for the case where you just want to check where you are.
77
78 -So doing a "git-diff-cache --cached" is basically very useful when you are
78 +So doing a "git-diff-index --cached" is basically very useful when you are
79 asking yourself "what have I already marked for being committed, and
80 what's the difference to a previous tree".
81
@@ -96,10 +96,10 @@ output to a tee, but with a twist.
96 The twist is that if some file doesn't match the cache, we don't have
97 a backing store thing for it, and we use the magic "all-zero" sha1 to
98 show that. So let's say that you have edited `kernel/sched.c`, but
99 -have not actually done a "git-update-cache" on it yet - there is no
99 +have not actually done a "git-update-index" on it yet - there is no
100 "object" associated with the new state, and you get:
101
102 - torvalds@ppc970:~/v2.6/linux> git-diff-cache $(cat .git/HEAD )
102 + torvalds@ppc970:~/v2.6/linux> git-diff-index $(cat .git/HEAD )
103 *100644->100664 blob 7476bb......->000000...... kernel/sched.c
104
105 ie it shows that the tree has changed, and that `kernel/sched.c` has is
@@ -107,7 +107,7 @@ not up-to-date and may contain new stuff. The all-zero sha1 means that to
107 get the real diff, you need to look at the object in the working directory
108 directly rather than do an object-to-object diff.
109
110 -NOTE! As with other commands of this type, "git-diff-cache" does not
110 +NOTE! As with other commands of this type, "git-diff-index" does not
111 actually look at the contents of the file at all. So maybe
112 `kernel/sched.c` hasn't actually changed, and it's just that you
113 touched it. In either case, it's a note that you need to
Documentation/git-diff-tree.txt
+2 -2
@@ -93,7 +93,7 @@ so it can be used to name subdirectories.
93 An example of normal usage is:
94
95 torvalds@ppc970:~/git> git-diff-tree 5319e4......
96 - *100664->100664 blob ac348b.......->a01513....... git-fsck-cache.c
96 + *100664->100664 blob ac348b.......->a01513....... git-fsck-objects.c
97
98 which tells you that the last commit changed just one file (it's from
99 this one:
@@ -104,7 +104,7 @@ this one:
104 author Linus Torvalds <torvalds@ppc970.osdl.org> Sat Apr 9 12:02:30 2005
105 committer Linus Torvalds <torvalds@ppc970.osdl.org> Sat Apr 9 12:02:30 2005
106
107 - Make "git-fsck-cache" print out all the root commits it finds.
107 + Make "git-fsck-objects" print out all the root commits it finds.
108
109 Once I do the reference tracking, I'll also make it print out all the
110 HEAD commits it finds, which is even more interesting.
Documentation/git-diff.txt renamed
+4 -4
@@ -1,14 +1,14 @@
1 -git-diff-script(1)
2 -==================
1 +git-diff(1)
2 +===========
3
4 NAME
5 ----
6 -git-diff-script - Some git command not yet documented.
6 +git-diff - Some git command not yet documented.
7
8
9 SYNOPSIS
10 --------
11 -'git-diff-script' [ --option ] <args>...
11 +'git-diff' [ --option ] <args>...
12
13 DESCRIPTION
14 -----------
Documentation/git-fetch.txt renamed
+4 -4
@@ -1,15 +1,15 @@
1 -git-fetch-script(1)
2 -===================
1 +git-fetch(1)
2 +============
3 v0.99.5, Aug 2005
4
5 NAME
6 ----
7 -git-fetch-script - Download objects and a head from another repository.
7 +git-fetch - Download objects and a head from another repository.
8
9
10 SYNOPSIS
11 --------
12 -'git-fetch-script' <repository> <refspec>...
12 +'git-fetch' <repository> <refspec>...
13
14
15 DESCRIPTION
Documentation/git-format-patch.txt renamed
+4 -4
@@ -1,14 +1,14 @@
1 -git-format-patch-script(1)
2 -==========================
1 +git-format-patch(1)
2 +===================
3
4 NAME
5 ----
6 -git-format-patch-script - Some git command not yet documented.
6 +git-format-patch - Some git command not yet documented.
7
8
9 SYNOPSIS
10 --------
11 -'git-format-patch-script' [ --option ] <args>...
11 +'git-format-patch' [ --option ] <args>...
12
13 DESCRIPTION
14 -----------
Documentation/git-fsck-objects.txt renamed
+8 -8
@@ -1,15 +1,15 @@
1 -git-fsck-cache(1)
2 -=================
1 +git-fsck-objects(1)
2 +===================
3 v0.1, May 2005
4
5 NAME
6 ----
7 -git-fsck-cache - Verifies the connectivity and validity of the objects in the database
7 +git-fsck-objects - Verifies the connectivity and validity of the objects in the database
8
9
10 SYNOPSIS
11 --------
12 -'git-fsck-cache' [--tags] [--root] [--unreachable] [--cache] [--standalone | --full] [--strict] [<object>*]
12 +'git-fsck-objects' [--tags] [--root] [--unreachable] [--cache] [--standalone | --full] [--strict] [<object>*]
13
14 DESCRIPTION
15 -----------
@@ -20,7 +20,7 @@ OPTIONS
20 <object>::
21 An object to treat as the head of an unreachability trace.
22
23 - If no objects are given, git-fsck-cache defaults to using the
23 + If no objects are given, git-fsck-objects defaults to using the
24 index file and all SHA1 references in .git/refs/* as heads.
25
26 --unreachable::
@@ -69,11 +69,11 @@ that aren't readable from any of the specified head nodes.
69
70 So for example
71
72 - git-fsck-cache --unreachable $(cat .git/HEAD .git/refs/heads/*)
72 + git-fsck-objects --unreachable $(cat .git/HEAD .git/refs/heads/*)
73
74 will do quite a _lot_ of verification on the tree. There are a few
75 extra validity tests to be added (make sure that tree objects are
76 -sorted properly etc), but on the whole if "git-fsck-cache" is happy, you
76 +sorted properly etc), but on the whole if "git-fsck-objects" is happy, you
77 do have a valid tree.
78
79 Any corrupt objects you will have to find in backups or other archives
@@ -111,7 +111,7 @@ dangling <type> <object>::
111 The <type> object <object>, is present in the database but never
112 'directly' used. A dangling commit could be a root node.
113
114 -warning: git-fsck-cache: tree <tree> has full pathnames in it::
114 +warning: git-fsck-objects: tree <tree> has full pathnames in it::
115 And it shouldn't...
116
117 sha1 mismatch <object>::
Documentation/git-hash-object.txt
+1 -1
@@ -17,7 +17,7 @@ Computes the object ID value for an object with specified type
17 with the contents of the named file (which can be outside of the
18 work tree), and optionally writes the resulting object into the
19 object database. Reports its object ID to its standard output.
20 -This is used by "git-cvsimport-script" to update the cache
20 +This is used by "git-cvsimport" to update the cache
21 without modifying files in the work tree. When <type> is not
22 specified, it defaults to "blob".
23
Documentation/git-http-fetch.txt renamed
+4 -4
@@ -1,15 +1,15 @@
1 -git-http-pull(1)
2 -================
1 +git-http-fetch(1)
2 +=================
3 v0.1, May 2005
4
5 NAME
6 ----
7 -git-http-pull - Downloads a remote GIT repository via HTTP
7 +git-http-fetch - Downloads a remote GIT repository via HTTP
8
9
10 SYNOPSIS
11 --------
12 -'git-http-pull' [-c] [-t] [-a] [-d] [-v] [-w filename] [--recover] commit-id url
12 +'git-http-fetch' [-c] [-t] [-a] [-d] [-v] [-w filename] [--recover] commit-id url
13
14 DESCRIPTION
15 -----------
Documentation/git-local-fetch.txt renamed
+4 -4
@@ -1,15 +1,15 @@
1 -git-local-pull(1)
2 -=================
1 +git-local-fetch(1)
2 +==================
3 v0.1, May 2005
4
5 NAME
6 ----
7 -git-local-pull - Duplicates another GIT repository on a local system
7 +git-local-fetch - Duplicates another GIT repository on a local system
8
9
10 SYNOPSIS
11 --------
12 -'git-local-pull' [-c] [-t] [-a] [-d] [-v] [-w filename] [--recover] [-l] [-s] [-n] commit-id path
12 +'git-local-fetch' [-c] [-t] [-a] [-d] [-v] [-w filename] [--recover] [-l] [-s] [-n] commit-id path
13
14 DESCRIPTION
15 -----------
Documentation/git-log.txt renamed
+3 -3
@@ -1,10 +1,10 @@
1 -git-log-script(1)
2 -=================
1 +git-log(1)
2 +==========
3 v0.99.4, Aug 2005
4
5 NAME
6 ----
7 -git-log-script - Show commit logs
7 +git-log - Show commit logs
8
9
10 SYNOPSIS
Documentation/git-ls-remote.txt renamed
+3 -3
@@ -1,10 +1,10 @@
1 -git-ls-remote-script(1)
2 -=======================
1 +git-ls-remote(1)
2 +================
3 v0.1, May 2005
4
5 NAME
6 ----
7 -git-ls-remote-script - Look at references other repository has.
7 +git-ls-remote - Look at references other repository has.
8
9
10 SYNOPSIS
Documentation/git-merge-index.txt renamed
+9 -9
@@ -1,15 +1,15 @@
1 -git-merge-cache(1)
1 +git-merge-index(1)
2 ==================
3 v0.1, May 2005
4
5 NAME
6 ----
7 -git-merge-cache - Runs a merge for files needing merging
7 +git-merge-index - Runs a merge for files needing merging
8
9
10 SYNOPSIS
11 --------
12 -'git-merge-cache' [-o] [-q] <merge-program> (-a | -- | <file>\*)
12 +'git-merge-index' [-o] [-q] <merge-program> (-a | -- | <file>\*)
13
14 DESCRIPTION
15 -----------
@@ -37,14 +37,14 @@ OPTIONS
37 failure usually indicates conflicts during merge). This is for
38 porcelains which might want to emit custom messages.
39
40 -If "git-merge-cache" is called with multiple <file>s (or -a) then it
40 +If "git-merge-index" is called with multiple <file>s (or -a) then it
41 processes them in turn only stopping if merge returns a non-zero exit
42 code.
43
44 Typically this is run with the a script calling the merge command from
45 the RCS package.
46
47 -A sample script called "git-merge-one-file-script" is included in the
47 +A sample script called "git-merge-one-file" is included in the
48 distribution.
49
50 ALERT ALERT ALERT! The git "merge object order" is different from the
@@ -54,7 +54,7 @@ original is first. But the argument order to the 3-way merge program
54
55 Examples:
56
57 - torvalds@ppc970:~/merge-test> git-merge-cache cat MM
57 + torvalds@ppc970:~/merge-test> git-merge-index cat MM
58 This is MM from the original tree. # original
59 This is modified MM in the branch A. # merge1
60 This is modified MM in the branch B. # merge2
@@ -62,17 +62,17 @@ Examples:
62
63 or
64
65 - torvalds@ppc970:~/merge-test> git-merge-cache cat AA MM
65 + torvalds@ppc970:~/merge-test> git-merge-index cat AA MM
66 cat: : No such file or directory
67 This is added AA in the branch A.
68 This is added AA in the branch B.
69 This is added AA in the branch B.
70 fatal: merge program failed
71
72 -where the latter example shows how "git-merge-cache" will stop trying to
72 +where the latter example shows how "git-merge-index" will stop trying to
73 merge once anything has returned an error (ie "cat" returned an error
74 for the AA file, because it didn't exist in the original, and thus
75 -"git-merge-cache" didn't even try to merge the MM thing).
75 +"git-merge-index" didn't even try to merge the MM thing).
76
77 Author
78 ------
Documentation/git-merge-one-file.txt renamed
+5 -5
@@ -1,19 +1,19 @@
1 -git-merge-one-file-script(1)
2 -============================
1 +git-merge-one-file(1)
2 +=====================
3 v0.99.4, Aug 2005
4
5 NAME
6 ----
7 -git-merge-one-file-script - The standard helper program to use with "git-merge-cache"
7 +git-merge-one-file - The standard helper program to use with "git-merge-index"
8
9
10 SYNOPSIS
11 --------
12 -'git-merge-one-file-script'
12 +'git-merge-one-file'
13
14 DESCRIPTION
15 -----------
16 -This is the standard helper program to use with "git-merge-cache"
16 +This is the standard helper program to use with "git-merge-index"
17 to resolve a merge after the trivial merge done with "git-read-tree -m".
18
19 Author
Documentation/git-octopus.txt renamed
+3 -3
@@ -1,10 +1,10 @@
1 -git-octopus-script(1)
2 -=====================
1 +git-octopus(1)
2 +==============
3 v0.99.5, Aug 2005
4
5 NAME
6 ----
7 -git-octopus-script - Merge more than two commits.
7 +git-octopus - Merge more than two commits.
8
9
10 SYNOPSIS
Documentation/git-pack-objects.txt
+1 -1
@@ -76,7 +76,7 @@ Documentation by Junio C Hamano
76
77 See-Also
78 --------
79 -git-repack-script(1) git-prune-packed(1)
79 +git-repack(1) git-prune-packed(1)
80
81 GIT
82 ---
Documentation/git-parse-remote.txt renamed
+4 -4
@@ -1,14 +1,14 @@
1 -git-parse-remote-script(1)
2 -==========================
1 +git-parse-remote(1)
2 +===================
3
4 NAME
5 ----
6 -git-parse-remote-script - Routines to help parsing $GIT_DIR/remotes/
6 +git-parse-remote - Routines to help parsing $GIT_DIR/remotes/
7
8
9 SYNOPSIS
10 --------
11 -'. git-parse-remote-script'
11 +'. git-parse-remote'
12
13 DESCRIPTION
14 -----------
Documentation/git-prune-packed.txt
+1 -1
@@ -34,7 +34,7 @@ Documentation by Ryan Anderson <ryan@michonline.com>
34
35 See-Also
36 --------
37 -git-pack-objects(1) git-repack-script(1)
37 +git-pack-objects(1) git-repack(1)
38
39 GIT
40 ---
Documentation/git-prune.txt renamed
+5 -5
@@ -1,20 +1,20 @@
1 -git-prune-script(1)
2 -===================
1 +git-prune(1)
2 +============
3 v0.99.5, Aug 2005
4
5 NAME
6 ----
7 -git-prune-script - Prunes all unreachable objects from the object database
7 +git-prune - Prunes all unreachable objects from the object database
8
9
10 SYNOPSIS
11 --------
12 -'git-prune-script' [-n]
12 +'git-prune' [-n]
13
14 DESCRIPTION
15 -----------
16
17 -This runs `git-fsck-cache --unreachable` using the heads
17 +This runs `git-fsck-objects --unreachable` using the heads
18 specified on the command line (or `$GIT_DIR/refs/heads/\*` and
19 `$GIT_DIR/refs/tags/\*` if none is specified), and prunes all
20 unreachable objects from the object database. In addition, it
Documentation/git-pull.txt renamed
+5 -5
@@ -1,20 +1,20 @@
1 -git-pull-script(1)
2 -==================
1 +git-pull(1)
2 +===========
3 v0.99.4, Aug 2005
4
5 NAME
6 ----
7 -git-pull-script - Pull and merge from another repository.
7 +git-pull - Pull and merge from another repository.
8
9
10 SYNOPSIS
11 --------
12 -'git-pull-script' <repository> <refspec>...
12 +'git-pull' <repository> <refspec>...
13
14
15 DESCRIPTION
16 -----------
17 -Runs 'git-fetch-script' with the given parameters.
17 +Runs 'git-fetch' with the given parameters.
18
19 When only one ref is downloaded, runs 'git resolve' to merge it
20 into the local HEAD. Otherwise uses 'git octopus' to merge them
Documentation/git-push.txt renamed
+4 -4
@@ -1,14 +1,14 @@
1 -git-push-script(1)
2 -==================
1 +git-push(1)
2 +===========
3
4 NAME
5 ----
6 -git-push-script - Update remote refs along with associated objects.
6 +git-push - Update remote refs along with associated objects.
7
8
9 SYNOPSIS
10 --------
11 -'git-push-script' [--all] [--force] <repository> <refspec>...
11 +'git-push' [--all] [--force] <repository> <refspec>...
12
13 DESCRIPTION
14 -----------
Documentation/git-read-tree.txt
+12 -12
@@ -16,7 +16,7 @@ DESCRIPTION
16 -----------
17 Reads the tree information given by <tree-ish> into the directory cache,
18 but does not actually *update* any of the files it "caches". (see:
19 -git-checkout-cache)
19 +git-checkout-index)
20
21 Optionally, it can merge a tree into the cache, perform a
22 fast-forward (i.e. 2-way) merge, or a 3-way merge, with the -m
@@ -56,7 +56,7 @@ being read, the stat info from the cache is used. (In other words, the
56 cache's stat()s take precedence over the merged tree's).
57
58 That means that if you do a "git-read-tree -m <newtree>" followed by a
59 -"git-checkout-cache -f -u -a", the "git-checkout-cache" only checks out
59 +"git-checkout-index -f -u -a", the "git-checkout-index" only checks out
60 the stuff that really changed.
61
62 This is used to avoid unnecessary false hits when "git-diff-files" is
@@ -126,13 +126,13 @@ operating under the -u flag.
126
127 When this form of git-read-tree returns successfully, you can
128 see what "local changes" you made are carried forward by running
129 -"git-diff-cache --cached $M". Note that this does not
130 -necessarily match "git-diff-cache --cached $H" would have
129 +"git-diff-index --cached $M". Note that this does not
130 +necessarily match "git-diff-index --cached $H" would have
131 produced before such a two tree merge. This is because of cases
132 18 and 19 --- if you already had the changes in $M (e.g. maybe
133 -you picked it up via e-mail in a patch form), "git-diff-cache
133 +you picked it up via e-mail in a patch form), "git-diff-index
134 --cached $H" would have told you about the change before this
135 -merge, but it would not show in "git-diff-cache --cached $M"
135 +merge, but it would not show in "git-diff-index --cached $M"
136 output after two-tree merge.
137
138
@@ -205,8 +205,8 @@ populated. Here is an outline of how the algorithm works:
205 matching "stage1" entry if it exists too. .. all the normal
206 trivial rules ..
207
208 -You would normally use "git-merge-cache" with supplied
209 -"git-merge-one-file-script" to do this last step. The script
208 +You would normally use "git-merge-index" with supplied
209 +"git-merge-one-file" to do this last step. The script
210 does not touch the files in the work tree, and the entire merge
211 happens in the index file. In other words, there is no need to
212 worry about what is in the working directory, since it is never
@@ -225,13 +225,13 @@ changes. To illustrate, suppose you start from what has been
225 commited last to your repository:
226
227 $ JC=`cat .git/HEAD`
228 - $ git-checkout-cache -f -u -a $JC
228 + $ git-checkout-index -f -u -a $JC
229
230 -You do random edits, without running git-update-cache. And then
230 +You do random edits, without running git-update-index. And then
231 you notice that the tip of your "upstream" tree has advanced
232 since you pulled from him:
233
234 - $ git-fetch-script rsync://.... linus
234 + $ git-fetch rsync://.... linus
235 $ LT=`cat .git/MERGE_HEAD`
236
237 Your work tree is still based on your HEAD ($JC), but you have
@@ -240,7 +240,7 @@ added or modified cache entries since $JC, and if you haven't,
240 then does the right thing. So with the following sequence:
241
242 $ git-read-tree -m -u `git-merge-base $JC $LT` $JC $LT
243 - $ git-merge-cache git-merge-one-file-script -a
243 + $ git-merge-index git-merge-one-file -a
244 $ echo "Merge with Linus" | \
245 git-commit-tree `git-write-tree` -p $JC -p $LT
246
Documentation/git-rebase.txt renamed
+4 -4
@@ -1,13 +1,13 @@
1 -git-rebase-script(1)
2 -====================
1 +git-rebase(1)
2 +=============
3
4 NAME
5 ----
6 -git-rebase-script - Rebase local commits to new upstream head.
6 +git-rebase - Rebase local commits to new upstream head.
7
8 SYNOPSIS
9 --------
10 -'git-rebase-script' <upstream> [<head>]
10 +'git-rebase' <upstream> [<head>]
11
12 DESCRIPTION
13 -----------
Documentation/git-relink.txt renamed
+4 -4
@@ -1,13 +1,13 @@
1 -git-relink-script(1)
2 -====================
1 +git-relink(1)
2 +=============
3
4 NAME
5 ----
6 -git-relink-script - Hardlink common objects in local repositories.
6 +git-relink - Hardlink common objects in local repositories.
7
8 SYNOPSIS
9 --------
10 -'git-relink-script' [--safe] <dir> <dir> [<dir>]\*
10 +'git-relink' [--safe] <dir> <dir> [<dir>]\*
11
12 DESCRIPTION
13 -----------
Documentation/git-rename.txt renamed
+4 -4
@@ -1,15 +1,15 @@
1 -git-rename-script(1)
2 -====================
1 +git-rename(1)
2 +=============
3 v0.1, May 2005
4
5 NAME
6 ----
7 -git-rename-script - Script used to rename a file, directory or symlink.
7 +git-rename - Script used to rename a file, directory or symlink.
8
9
10 SYNOPSIS
11 --------
12 -'git-rename-script' <source> <destination>
12 +'git-rename' <source> <destination>
13
14 DESCRIPTION
15 -----------
Documentation/git-repack.txt renamed
+4 -4
@@ -1,16 +1,16 @@
1 -git-repack-script(1)
2 -====================
1 +git-repack(1)
2 +=============
3 v0.99.5, August 2005
4
5 NAME
6 ----
7 -git-repack-script - Script used to pack a repository from a collection of
7 +git-repack - Script used to pack a repository from a collection of
8 objects into pack files.
9
10
11 SYNOPSIS
12 --------
13 -'git-repack-script' [-a] [-d]
13 +'git-repack' [-a] [-d]
14
15 DESCRIPTION
16 -----------
Documentation/git-request-pull.txt renamed
+4 -4
@@ -1,13 +1,13 @@
1 -git-request-pull-script(1)
2 -==========================
1 +git-request-pull(1)
2 +===================
3
4 NAME
5 ----
6 -git-request-pull-script - Generates a summary of pending changes.
6 +git-request-pull - Generates a summary of pending changes.
7
8 SYNOPSIS
9 --------
10 -'git-request-pull-script' <start> <url> [<end>]
10 +'git-request-pull' <start> <url> [<end>]
11
12 DESCRIPTION
13 -----------
Documentation/git-reset.txt renamed
+4 -4
@@ -1,13 +1,13 @@
1 -git-reset-script(1)
2 -===================
1 +git-reset(1)
2 +============
3
4 NAME
5 ----
6 -git-reset-script - Reset current HEAD to the specified state.
6 +git-reset - Reset current HEAD to the specified state.
7
8 SYNOPSIS
9 --------
10 -'git-reset-script' [--mixed | --soft | --hard] [<commit-ish>]
10 +'git-reset' [--mixed | --soft | --hard] [<commit-ish>]
11
12 DESCRIPTION
13 -----------
Documentation/git-resolve.txt renamed
+3 -3
@@ -1,10 +1,10 @@
1 -git-resolve-script(1)
2 -=====================
1 +git-resolve(1)
2 +==============
3 v0.99.5, Aug 2005
4
5 NAME
6 ----
7 -git-resolve-script - Merge two commits
7 +git-resolve - Merge two commits
8
9
10 SYNOPSIS
Documentation/git-revert.txt renamed
+4 -4
@@ -1,13 +1,13 @@
1 -git-revert-script(1)
2 -====================
1 +git-revert(1)
2 +=============
3
4 NAME
5 ----
6 -git-revert-script - Revert an existing commit.
6 +git-revert - Revert an existing commit.
7
8 SYNOPSIS
9 --------
10 -'git-revert-script' [-n] <commit>
10 +'git-revert' [-n] <commit>
11
12 DESCRIPTION
13 -----------
Documentation/git-send-email.txt renamed
+5 -5
@@ -1,15 +1,15 @@
1 -git-send-email-script(1)
2 -========================
1 +git-send-email(1)
2 +=================
3 v0.1, July 2005
4
5 NAME
6 ----
7 -git-send-email-script - Send a collection of patches as emails
7 +git-send-email - Send a collection of patches as emails
8
9
10 SYNOPSIS
11 --------
12 -'git-send-email-script' [options] <file|directory> [... file|directory]
12 +'git-send-email' [options] <file|directory> [... file|directory]
13
14
15
@@ -66,7 +66,7 @@ Author
66 ------
67 Written by Ryan Anderson <ryan@michonline.com>
68
69 -git-send-email-script is originally based upon
69 +git-send-email is originally based upon
70 send_lots_of_email.pl by Greg Kroah-Hartman.
71
72 Documentation
Documentation/git-sh-setup.txt renamed
+5 -5
@@ -1,13 +1,13 @@
1 -git-sh-setup-script(1)
2 -======================
1 +git-sh-setup(1)
2 +===============
3
4 NAME
5 ----
6 -git-sh-setup-script - Common git shell script setup code.
6 +git-sh-setup - Common git shell script setup code.
7
8 SYNOPSIS
9 --------
10 -'git-sh-setup-script'
10 +'git-sh-setup'
11
12 DESCRIPTION
13 -----------
@@ -16,7 +16,7 @@ Sets up the normal git environment variables and a few helper functions
16 (currently just "die()"), and returns ok if it all looks like a git archive.
17 So use it something like
18
19 - . git-sh-setup-script || die "Not a git archive"
19 + . git-sh-setup || die "Not a git archive"
20
21 to make the rest of the git scripts more careful and readable.
22
Documentation/git-show-branch.txt
+1 -1
@@ -88,7 +88,7 @@ the name of the branch because it is obvious.
88 $ git show-branch --more=4 master
89 [master] Add 'git show-branch'.
90 [~1] Add a new extended SHA1 syntax <name>~<num>
91 -[~2] Fix "git-diff-script A B"
91 +[~2] Fix "git-diff A B"
92 [~3] git-ls-files: generalized pathspecs
93 [~4] Make "git-ls-files" work in subdirectories
94 ------------------------------------------------
Documentation/git-ssh-fetch.txt renamed
+6 -6
@@ -1,22 +1,22 @@
1 -git-ssh-pull(1)
2 -===============
1 +git-ssh-fetch(1)
2 +================
3 v0.1, May 2005
4
5 NAME
6 ----
7 -git-ssh-pull - Pulls from a remote repository over ssh connection
7 +git-ssh-fetch - Pulls from a remote repository over ssh connection
8
9
10
11 SYNOPSIS
12 --------
13 -'git-ssh-pull' [-c] [-t] [-a] [-d] [-v] [-w filename] [--recover] commit-id url
13 +'git-ssh-fetch' [-c] [-t] [-a] [-d] [-v] [-w filename] [--recover] commit-id url
14
15 DESCRIPTION
16 -----------
17 Pulls from a remote repository over ssh connection, invoking
18 -git-ssh-push on the other end. It functions identically to
19 -git-ssh-push, aside from which end you run it on.
18 +git-ssh-upload on the other end. It functions identically to
19 +git-ssh-upload, aside from which end you run it on.
20
21
22 OPTIONS
Documentation/git-ssh-upload.txt renamed
+6 -6
@@ -1,21 +1,21 @@
1 -git-ssh-push(1)
2 -===============
1 +git-ssh-upload(1)
2 +=================
3 v0.1, Jun 2005
4
5 NAME
6 ----
7 -git-ssh-push - Pushes to a remote repository over ssh connection
7 +git-ssh-upload - Pushes to a remote repository over ssh connection
8
9
10 SYNOPSIS
11 --------
12 -'git-ssh-push' [-c] [-t] [-a] [-d] [-v] [-w filename] [--recover] commit-id url
12 +'git-ssh-upload' [-c] [-t] [-a] [-d] [-v] [-w filename] [--recover] commit-id url
13
14 DESCRIPTION
15 -----------
16 Pushes from a remote repository over ssh connection, invoking
17 -git-ssh-pull on the other end. It functions identically to
18 -git-ssh-pull, aside from which end you run it on.
17 +git-ssh-fetch on the other end. It functions identically to
18 +git-ssh-fetch, aside from which end you run it on.
19
20 OPTIONS
21 -------
Documentation/git-status.txt renamed
+4 -4
@@ -1,10 +1,10 @@
1 -git-status-script(1)
2 -====================
1 +git-status(1)
2 +=============
3 v0.99.4, Aug 2005
4
5 NAME
6 ----
7 -git-status-script - Show working tree status.
7 +git-status - Show working tree status.
8
9
10 SYNOPSIS
@@ -16,7 +16,7 @@ DESCRIPTION
16 Examines paths in the working tree that has changes unrecorded
17 to the index file, and changes between the index file and the
18 current HEAD commit. The former paths are what you _could_
19 -commit by running 'git-update-cache' before running 'git
19 +commit by running 'git-update-index' before running 'git
20 commit', and the latter paths are what you _would_ commit by
21 running 'git commit'.
22
Documentation/git-tag.txt renamed
+4 -4
@@ -1,16 +1,16 @@
1 -git-tag-script(1)
2 -=================
1 +git-tag(1)
2 +==========
3 v0.99.4, Aug 2005
4
5 NAME
6 ----
7 -git-tag-script - Create a tag object signed with GPG
7 +git-tag - Create a tag object signed with GPG
8
9
10
11 SYNOPSIS
12 --------
13 -'git-tag-script' [-s | -a] [-f] <name>
13 +'git-tag' [-s | -a] [-f] <name>
14
15 DESCRIPTION
16 -----------
Documentation/git-update-index.txt renamed
+7 -7
@@ -1,15 +1,15 @@
1 -git-update-cache(1)
1 +git-update-index(1)
2 ===================
3 v0.1, May 2005
4
5 NAME
6 ----
7 -git-update-cache - Modifies the index or directory cache
7 +git-update-index - Modifies the index or directory cache
8
9
10 SYNOPSIS
11 --------
12 -'git-update-cache'
12 +'git-update-index'
13 [--add] [--remove] [--refresh] [--replace]
14 [--ignore-missing]
15 [--force-remove]
@@ -23,7 +23,7 @@ Modifies the index or directory cache. Each file mentioned is updated
23 into the cache and any 'unmerged' or 'needs updating' state is
24 cleared.
25
26 -The way "git-update-cache" handles files it is told about can be modified
26 +The way "git-update-index" handles files it is told about can be modified
27 using the various options:
28
29 OPTIONS
@@ -59,7 +59,7 @@ OPTIONS
59
60 --replace::
61 By default, when a file `path` exists in the index,
62 - git-update-cache refuses an attempt to add `path/file`.
62 + git-update-index refuses an attempt to add `path/file`.
63 Similarly if a file `path/file` exists, a file `path`
64 cannot be added. With --replace flag, existing entries
65 that conflicts with the entry being added are
@@ -94,7 +94,7 @@ merging.
94
95 To pretend you have a file with mode and sha1 at path, say:
96
97 - $ git-update-cache --cacheinfo mode sha1 path
97 + $ git-update-index --cacheinfo mode sha1 path
98
99 '--info-only' is used to register files without placing them in the object
100 database. This is useful for status-only repositories.
@@ -109,7 +109,7 @@ Examples
109 --------
110 To update and refresh only the files already checked out:
111
112 - git-checkout-cache -n -f -a && git-update-cache --ignore-missing --refresh
112 + git-checkout-index -n -f -a && git-update-index --ignore-missing --refresh
113
114
115 Author
Documentation/git-var.txt
+1 -1
@@ -44,7 +44,7 @@ Your sysadmin must hate you!::
44 See Also
45 --------
46 link:git-commit-tree.html[git-commit-tree]
47 -link:git-tag-script.html[git-tag-script]
47 +link:git-tag.html[git-tag]
48
49 Author
50 ------
Documentation/git-verify-tag.txt renamed
+5 -5
@@ -1,17 +1,17 @@
1 -git-verify-tag-script(1)
2 -========================
1 +git-verify-tag(1)
2 +=================
3
4 NAME
5 ----
6 -git-verify-tag-script - Check the GPG signature of tag.
6 +git-verify-tag - Check the GPG signature of tag.
7
8 SYNOPSIS
9 --------
10 -'git-verify-tag-script' <tag>
10 +'git-verify-tag' <tag>
11
12 DESCRIPTION
13 -----------
14 -Validates the gpg signature created by git-tag-script.
14 +Validates the gpg signature created by git-tag.
15
16 OPTIONS
17 -------
Documentation/git-write-tree.txt
+1 -1
@@ -20,7 +20,7 @@ The cache must be merged.
20 Conceptually, "git-write-tree" sync()s the current directory cache contents
21 into a set of tree files.
22 In order to have that match what is actually in your directory right
23 -now, you need to have done a "git-update-cache" phase before you did the
23 +now, you need to have done a "git-update-index" phase before you did the
24 "git-write-tree".
25
26 OPTIONS
Documentation/git.txt
+95 -51
@@ -21,7 +21,7 @@ at the link:tutorial.html[tutorial] document.
21
22 The <<Discussion>> section below contains much useful definition and
23 clarification info - read that first. And of the commands, I suggest
24 -reading link:git-update-cache.html[git-update-cache] and
24 +reading link:git-update-index.html[git-update-index] and
25 link:git-read-tree.html[git-read-tree] first - I wish I had!
26
27 If you are migrating from CVS, link:cvs-migration.html[cvs migration]
@@ -59,8 +59,9 @@ link:git-apply.html[git-apply]::
59 Reads a "diff -up1" or git generated patch file and
60 applies it to the working tree.
61
62 -link:git-checkout-cache.html[git-checkout-cache]::
62 +link:git-checkout-index.html[git-checkout-index]::
63 Copy files from the cache to the working directory
64 + Previously this command was known as git-checkout-cache.
65
66 link:git-commit-tree.html[git-commit-tree]::
67 Creates a new commit object
@@ -71,8 +72,9 @@ link:git-hash-object.html[git-hash-object]::
72 link:git-init-db.html[git-init-db]::
73 Creates an empty git object database
74
74 -link:git-merge-cache.html[git-merge-cache]::
75 +link:git-merge-index.html[git-merge-index]::
76 Runs a merge for files needing merging
77 + Previously this command was known as git-merge-cache.
78
79 link:git-mktag.html[git-mktag]::
80 Creates a tag object
@@ -89,8 +91,9 @@ link:git-read-tree.html[git-read-tree]::
91 link:git-unpack-objects.html[git-unpack-objects]::
92 Unpacks objects out of a packed archive.
93
92 -link:git-update-cache.html[git-update-cache]::
94 +link:git-update-index.html[git-update-index]::
95 Modifies the index or directory cache
96 + Previously this command was known as git-update-cache.
97
98 link:git-write-tree.html[git-write-tree]::
99 Creates a tree from the current cache
@@ -102,8 +105,9 @@ Interrogation commands
105 link:git-cat-file.html[git-cat-file]::
106 Provide content or type information for repository objects
107
105 -link:git-diff-cache.html[git-diff-cache]::
108 +link:git-diff-index.html[git-diff-index]::
109 Compares content and mode of blobs between the cache and repository
110 + Previously this command was known as git-diff-cache.
111
112 link:git-diff-files.html[git-diff-files]::
113 Compares files in the working tree and the cache
@@ -117,8 +121,9 @@ link:git-diff-tree.html[git-diff-tree]::
121 link:git-export.html[git-export]::
122 Exports each commit and a diff against each of its parents
123
120 -link:git-fsck-cache.html[git-fsck-cache]::
124 +link:git-fsck-objects.html[git-fsck-objects]::
125 Verifies the connectivity and validity of the objects in the database
126 + Previously this command was known as git-fsck-cache.
127
128 link:git-ls-files.html[git-ls-files]::
129 Information about files in the cache/working directory
@@ -164,11 +169,13 @@ link:git-clone-pack.html[git-clone-pack]::
169 link:git-fetch-pack.html[git-fetch-pack]::
170 Updates from a remote repository.
171
167 -link:git-http-pull.html[git-http-pull]::
172 +link:git-http-fetch.html[git-http-fetch]::
173 Downloads a remote GIT repository via HTTP
174 + Previously this command was known as git-http-pull.
175
170 -link:git-local-pull.html[git-local-pull]::
176 +link:git-local-fetch.html[git-local-fetch]::
177 Duplicates another GIT repository on a local system
178 + Previously this command was known as git-local-pull.
179
180 link:git-peek-remote.html[git-peek-remote]::
181 Lists references on a remote repository using upload-pack protocol.
@@ -179,11 +186,13 @@ link:git-receive-pack.html[git-receive-pack]::
186 link:git-send-pack.html[git-send-pack]::
187 Pushes to a remote repository, intelligently.
188
182 -link:git-ssh-pull.html[git-ssh-pull]::
189 +link:git-ssh-fetch.html[git-ssh-fetch]::
190 Pulls from a remote repository over ssh connection
191 + Previously this command was known as git-ssh-pull.
192
185 -link:git-ssh-push.html[git-ssh-push]::
186 - Helper "server-side" program used by git-ssh-pull
193 +link:git-ssh-upload.html[git-ssh-upload]::
194 + Helper "server-side" program used by git-ssh-fetch
195 + Previously this command was known as git-ssh-push.
196
197 link:git-update-server-info.html[git-update-server-info]::
198 Updates auxiliary information on a dumb server to help
@@ -197,65 +206,84 @@ link:git-upload-pack.html[git-upload-pack]::
206 Porcelain-ish Commands
207 ----------------------
208
200 -link:git-add-script.html[git-add-script]::
209 +link:git-add.html[git-add]::
210 Add paths to the index file.
211 + Previously this command was known as git-add-script.
212
213 link:git-applymbox.html[git-applymbox]::
214 Apply patches from a mailbox.
215
206 -link:git-bisect-script.html[git-bisect-script]::
216 +link:git-bisect.html[git-bisect]::
217 Find the change that introduced a bug.
218 + Previously this command was known as git-bisect-script.
219
209 -link:git-branch-script.html[git-branch-script]::
220 +link:git-branch.html[git-branch]::
221 Create and Show branches.
222 + Previously this command was known as git-branch-script.
223
212 -link:git-checkout-script.html[git-checkout-script]::
224 +link:git-checkout.html[git-checkout]::
225 Checkout and switch to a branch.
226 + Previously this command was known as git-checkout-script.
227
215 -link:git-cherry-pick-script.html[git-cherry-pick-script]::
228 +link:git-cherry-pick.html[git-cherry-pick]::
229 Cherry-pick the effect of an existing commit.
230 + Previously this command was known as git-cherry-pick-script.
231
218 -link:git-clone-script.html[git-clone-script]::
232 +link:git-clone.html[git-clone]::
233 Clones a repository into a new directory.
234 + Previously this command was known as git-clone-script.
235
221 -link:git-commit-script.html[git-commit-script]::
236 +link:git-commit.html[git-commit]::
237 Record changes to the repository.
238 + Previously this command was known as git-commit-script.
239
224 -link:git-fetch-script.html[git-fetch-script]::
240 +link:git-fetch.html[git-fetch]::
241 Download from a remote repository via various protocols.
242 + Previously this command was known as git-fetch-script.
243
227 -link:git-log-script.html[git-log-script]::
244 +link:git-log.html[git-log]::
245 Shows commit logs.
246 + Previously this command was known as git-log-script.
247
230 -link:git-ls-remote-script.html[git-ls-remote-script]::
248 +link:git-ls-remote.html[git-ls-remote]::
249 Shows references in a remote or local repository.
250 + Previously this command was known as git-ls-remote-script.
251
233 -link:git-octopus-script.html[git-octopus-script]::
252 +link:git-octopus.html[git-octopus]::
253 Merge more than two commits.
254 + Previously this command was known as git-octopus-script.
255
236 -link:git-pull-script.html[git-pull-script]::
256 +link:git-pull.html[git-pull]::
257 Fetch from and merge with a remote repository.
258 + Previously this command was known as git-pull-script.
259
239 -link:git-push-script.html[git-push-script]::
260 +link:git-push.html[git-push]::
261 Update remote refs along with associated objects.
262 + Previously this command was known as git-push-script.
263
242 -link:git-rebase-script.html[git-rebase-script]::
264 +link:git-rebase.html[git-rebase]::
265 Rebase local commits to new upstream head.
266 + Previously this command was known as git-rebase-script.
267
245 -link:git-rename-script.html[git-rename]::
268 +link:git-rename.html[git-rename]::
269 Rename files and directories.
270 + Previously this command was known as git-rename-script.
271
248 -link:git-repack-script.html[git-repack-script]::
272 +link:git-repack.html[git-repack]::
273 Pack unpacked objects in a repository.
274 + Previously this command was known as git-repack-script.
275
251 -link:git-reset-script.html[git-reset-script]::
276 +link:git-reset.html[git-reset]::
277 Reset current HEAD to the specified state.
278 + Previously this command was known as git-reset-script.
279
254 -link:git-resolve-script.html[git-resolve-script]::
280 +link:git-resolve.html[git-resolve]::
281 Merge two commits.
282 + Previously this command was known as git-resolve-script.
283
257 -link:git-revert-script.html[git-revert-script]::
284 +link:git-revert.html[git-revert]::
285 Revert an existing commit.
286 + Previously this command was known as git-revert-script.
287
288 link:git-shortlog.html[git-shortlog]::
289 Summarizes 'git log' output.
@@ -263,11 +291,13 @@ link:git-shortlog.html[git-shortlog]::
291 link:git-show-branch.html[git-show-branch]::
292 Show branches and their commits.
293
266 -link:git-status-script.html[git-status-script]::
294 +link:git-status.html[git-status]::
295 Shows the working tree status.
296 + Previously this command was known as git-status-script.
297
269 -link:git-verify-tag-script.html[git-verify-tag-script]::
298 +link:git-verify-tag.html[git-verify-tag]::
299 Check the GPG signature of tag.
300 + Previously this command was known as git-verify-tag-script.
301
302 link:git-whatchanged.html[git-whatchanged]::
303 Shows commit logs and differences they introduce.
@@ -280,29 +310,37 @@ Manipulators:
310 link:git-applypatch.html[git-applypatch]::
311 Apply one patch extracted from an e-mail.
312
283 -link:git-archimport-script.html[git-archimport-script]::
313 +link:git-archimport.html[git-archimport]::
314 Import an arch repository into git.
315 + Previously this command was known as git-archimport-script.
316
286 -link:git-convert-cache.html[git-convert-cache]::
317 +link:git-convert-objects.html[git-convert-objects]::
318 Converts old-style GIT repository
319 + Previously this command was known as git-convert-cache.
320
289 -link:git-cvsimport-script.html[git-cvsimport-script]::
321 +link:git-cvsimport.html[git-cvsimport]::
322 Salvage your data out of another SCM people love to hate.
323 + Previously this command was known as git-cvsimport-script.
324
292 -link:git-merge-one-file-script.html[git-merge-one-file-script]::
293 - The standard helper program to use with "git-merge-cache"
325 +link:git-merge-one-file.html[git-merge-one-file]::
326 + The standard helper program to use with "git-merge-index"
327 + Previously this command was known as git-merge-one-file-script.
328
295 -link:git-prune-script.html[git-prune-script]::
329 +link:git-prune.html[git-prune]::
330 Prunes all unreachable objects from the object database
331 + Previously this command was known as git-prune-script.
332
298 -link:git-relink-script.html[git-relink-script]::
333 +link:git-relink.html[git-relink]::
334 Hardlink common objects in local repositories.
335 + Previously this command was known as git-relink-script.
336
301 -link:git-sh-setup-script.html[git-sh-setup-script]::
337 +link:git-sh-setup.html[git-sh-setup]::
338 Common git shell script setup code.
339 + Previously this command was known as git-sh-setup-script.
340
304 -link:git-tag-script.html[git-tag-script]::
341 +link:git-tag.html[git-tag]::
342 An example script to create a tag object signed with GPG
343 + Previously this command was known as git-tag-script.
344
345
346 Interrogators:
@@ -313,8 +351,9 @@ link:git-build-rev-cache.html[git-build-rev-cache]::
351 link:git-cherry.html[git-cherry]::
352 Find commits not merged upstream.
353
316 -link:git-count-objects-script.html[git-count-objects-script]::
354 +link:git-count-objects.html[git-count-objects]::
355 Count unpacked number of objects and their disk consumption.
356 + Previously this command was known as git-count-objects-script.
357
358 link:git-daemon.html[git-daemon]::
359 A really simple server for GIT repositories.
@@ -334,17 +373,20 @@ link:git-mailsplit.html[git-mailsplit]::
373 link:git-patch-id.html[git-patch-id]::
374 Compute unique ID for a patch.
375
337 -link:git-parse-remote-script.html[git-parse-remote-script]::
376 +link:git-parse-remote.html[git-parse-remote]::
377 Routines to help parsing $GIT_DIR/remotes/
378 + Previously this command was known as git-parse-remote-script.
379
340 -link:git-request-pull-script.html[git-request-pull-script]::
341 - git-request-pull-script.
380 +link:git-request-pull.html[git-request-pull]::
381 + git-request-pull.
382 + Previously this command was known as git-request-pull-script.
383
384 link:git-rev-parse.html[git-rev-parse]::
385 Pick out and massage parameters.
386
346 -link:git-send-email-script.html[git-send-email]::
387 +link:git-send-email.html[git-send-email]::
388 Send patch e-mails out of "format-patch --mbox" output.
389 + Previously this command was known as git-send-email-script.
390
391 link:git-show-rev-cache.html[git-show-rev-cache]::
392 Show the contents of a rev-cache file.
@@ -352,11 +394,13 @@ link:git-show-rev-cache.html[git-show-rev-cache]::
394 Commands not yet documented
395 ---------------------------
396
355 -link:git-diff-script.html[git-diff-script]::
356 - git-diff-script.
397 +link:git-diff.html[git-diff]::
398 + git-diff.
399 + Previously this command was known as git-diff-script.
400
358 -link:git-format-patch-script.html[git-format-patch-script]::
359 - git-format-patch-script.
401 +link:git-format-patch.html[git-format-patch]::
402 + git-format-patch.
403 + Previously this command was known as git-format-patch-script.
404
405 link:git-stripspace.html[git-stripspace]::
406 git-stripspace.
@@ -473,7 +517,7 @@ git Diffs
517 'GIT_DIFF_OPTS'::
518 'GIT_EXTERNAL_DIFF'::
519 see the "generating patches" section in :
476 - link:git-diff-cache.html[git-diff-cache];
520 + link:git-diff-index.html[git-diff-index];
521 link:git-diff-files.html[git-diff-files];
522 link:git-diff-tree.html[git-diff-tree]
523
Documentation/hooks.txt
+6 -6
@@ -56,11 +56,11 @@ the outcome of `git-applypatch`.
56 pre-commit
57 ----------
58
59 -This hook is invoked by `git-commit-script`, and can be bypassed
59 +This hook is invoked by `git-commit`, and can be bypassed
60 with `--no-verify` option. It takes no parameter, and is
61 invoked before obtaining the proposed commit log message and
62 making a commit. Exiting with non-zero status from this script
63 -causes the `git-commit-script` to abort.
63 +causes the `git-commit` to abort.
64
65 The default pre-commit hook, when enabled, catches introduction
66 of lines with trailing whitespaces and aborts the commit when
@@ -69,10 +69,10 @@ a such line is found.
69 commit-msg
70 ----------
71
72 -This hook is invoked by `git-commit-script`, and can be bypassed
72 +This hook is invoked by `git-commit`, and can be bypassed
73 with `--no-verify` option. It takes a single parameter, the
74 name of the file that holds the proposed commit log message.
75 -Exiting with non-zero status causes the `git-commit-script` to
75 +Exiting with non-zero status causes the `git-commit` to
76 abort.
77
78 The hook is allowed to edit the message file in place, and can
@@ -86,11 +86,11 @@ Signed-off-by: lines, and aborts the commit when one is found.
86 post-commit
87 -----------
88
89 -This hook is invoked by `git-commit-script`. It takes no
89 +This hook is invoked by `git-commit`. It takes no
90 parameter, and is invoked after a commit is made.
91
92 This hook is meant primarily for notification, and cannot affect
93 -the outcome of `git-commit-script`.
93 +the outcome of `git-commit`.
94
95 The default post-commit hook, when enabled, demonstrates how to
96 send out a commit notification e-mail.
Documentation/howto/make-dist.txt
+1 -1
@@ -32,7 +32,7 @@ This is my crappy "release-script":
32 stable="$1"
33 last="$2"
34 new="$3"
35 - echo "# git-tag-script v$new"
35 + echo "# git-tag v$new"
36 echo "git-tar-tree v$new linux-$new | gzip -9 > ../linux-$new.tar.gz"
37 echo "git-diff-tree -p v$stable v$new | gzip -9 > ../patch-$new.gz"
38 echo "git-rev-list --pretty v$new ^v$last > ../ChangeLog-$new"
Documentation/howto/rebase-from-internal-branch.txt
+1 -1
@@ -111,7 +111,7 @@ prepare #2 and #3 for e-mail submission.
111
112 This creates two files, 0001-XXXX.txt and 0002-XXXX.txt. Send
113 them out "To: " your project maintainer and "Cc: " your mailing
114 -list. You could use contributed script git-send-email-script if
114 +list. You could use contributed script git-send-email if
115 your host has necessary perl modules for this, but your usual
116 MUA would do as long as it does not corrupt whitespaces in the
117 patch.
Documentation/howto/revert-branch-rebase.txt
+2 -2
@@ -182,10 +182,10 @@ And the final repository status looks like this:
182 ------------------------------------------------
183 $ git show-branch --more=1 master pu rc
184 ! [master] Revert "Replace zero-length array decls with []."
185 - ! [pu] git-repack-script: Add option to repack all objects.
185 + ! [pu] git-repack: Add option to repack all objects.
186 * [rc] Merge refs/heads/master from .
187 ---
188 - + [pu] git-repack-script: Add option to repack all objects.
188 + + [pu] git-repack: Add option to repack all objects.
189 + [pu~1] More documentation updates.
190 + [pu~2] Show commits in topo order and name all commits.
191 + [pu~3] mailinfo and applymbox updates
Documentation/tutorial.txt
+27 -27
@@ -126,7 +126,7 @@ actually check in your hard work, you will have to go through two steps:
126 - commit that index file as an object.
127
128 The first step is trivial: when you want to tell git about any changes
129 -to your working tree, you use the `git-update-cache` program. That
129 +to your working tree, you use the `git-update-index` program. That
130 program normally just takes a list of filenames you want to update, but
131 to avoid trivial mistakes, it refuses to add new entries to the cache
132 (or remove existing ones) unless you explicitly tell it that you're
@@ -136,7 +136,7 @@ adding a new entry with the `\--add` flag (or removing an entry with the
136 So to populate the index with the two files you just created, you can do
137
138 ------------------------------------------------
139 -git-update-cache --add hello example
139 +git-update-index --add hello example
140 ------------------------------------------------
141
142 and you have now told git to track those two files.
@@ -183,7 +183,7 @@ hexadecimal digits in most places.
183 Anyway, as we mentioned previously, you normally never actually take a
184 look at the objects themselves, and typing long 40-character hex
185 names is not something you'd normally want to do. The above digression
186 -was just to show that `git-update-cache` did something magical, and
186 +was just to show that `git-update-index` did something magical, and
187 actually saved away the contents of your files into the git object
188 database.
189
@@ -318,7 +318,7 @@ instead, and it would have done the above magic scripting for you.
318 Making a change
319 ---------------
320
321 -Remember how we did the `git-update-cache` on file `hello` and then we
321 +Remember how we did the `git-update-index` on file `hello` and then we
322 changed `hello` afterward, and could compare the new state of `hello` with the
323 state we saved in the index file?
324
@@ -333,18 +333,18 @@ As before, if we do `git-diff-files -p` in our git-tutorial project,
333 we'll still see the same difference we saw last time: the index file
334 hasn't changed by the act of committing anything. However, now that we
335 have committed something, we can also learn to use a new command:
336 -`git-diff-cache`.
336 +`git-diff-index`.
337
338 Unlike `git-diff-files`, which showed the difference between the index
339 -file and the working tree, `git-diff-cache` shows the differences
339 +file and the working tree, `git-diff-index` shows the differences
340 between a committed *tree* and either the index file or the working
341 -tree. In other words, `git-diff-cache` wants a tree to be diffed
341 +tree. In other words, `git-diff-index` wants a tree to be diffed
342 against, and before we did the commit, we couldn't do that, because we
343 didn't have anything to diff against.
344
345 But now we can do
346
347 - git-diff-cache -p HEAD
347 + git-diff-index -p HEAD
348
349 (where `-p` has the same meaning as it did in `git-diff-files`), and it
350 will show us the same difference, but for a totally different reason.
@@ -359,16 +359,16 @@ it with
359
360 which ends up doing the above for you.
361
362 -In other words, `git-diff-cache` normally compares a tree against the
362 +In other words, `git-diff-index` normally compares a tree against the
363 working tree, but when given the `\--cached` flag, it is told to
364 instead compare against just the index cache contents, and ignore the
365 current working tree state entirely. Since we just wrote the index
366 -file to HEAD, doing `git-diff-cache \--cached -p HEAD` should thus return
366 +file to HEAD, doing `git-diff-index \--cached -p HEAD` should thus return
367 an empty set of differences, and that's exactly what it does.
368
369 [NOTE]
370 ================
371 -`git-diff-cache` really always uses the index for its
371 +`git-diff-index` really always uses the index for its
372 comparisons, and saying that it compares a tree against the working
373 tree is thus not strictly accurate. In particular, the list of
374 files to compare (the "meta-data") *always* comes from the index file,
@@ -391,7 +391,7 @@ work through the index file, so the first thing we need to do is to
391 update the index cache:
392
393 ------------------------------------------------
394 -git-update-cache hello
394 +git-update-index hello
395 ------------------------------------------------
396
397 (note how we didn't need the `\--add` flag this time, since git knew
@@ -399,9 +399,9 @@ about the file already).
399
400 Note what happens to the different `git-diff-\*` versions here. After
401 we've updated `hello` in the index, `git-diff-files -p` now shows no
402 -differences, but `git-diff-cache -p HEAD` still *does* show that the
402 +differences, but `git-diff-index -p HEAD` still *does* show that the
403 current state is different from the state we committed. In fact, now
404 -`git-diff-cache` shows the same difference whether we use the `--cached`
404 +`git-diff-index` shows the same difference whether we use the `--cached`
405 flag or not, since now the index is coherent with the working tree.
406
407 Now, since we've updated `hello` in the index, we can commit the new
@@ -429,7 +429,7 @@ You've now made your first real git commit. And if you're interested in
429 looking at what `git commit` really does, feel free to investigate:
430 it's a few very simple shell scripts to generate the helpful (?) commit
431 message headers, and a few one-liners that actually do the
432 -commit itself (`git-commit-script`).
432 +commit itself (`git-commit`).
433
434
435 Checking it out
@@ -490,11 +490,11 @@ can explore on your own.
490 Most likely, you are not directly using the core
491 git Plumbing commands, but using Porcelain like Cogito on top
492 of it. Cogito works a bit differently and you usually do not
493 -have to run `git-update-cache` yourself for changed files (you
493 +have to run `git-update-index` yourself for changed files (you
494 do tell underlying git about additions and removals via
495 `cg-add` and `cg-rm` commands). Just before you make a commit
496 with `cg-commit`, Cogito figures out which files you modified,
497 -and runs `git-update-cache` on them for you.
497 +and runs `git-update-index` on them for you.
498
499
500 Tagging a version
@@ -579,7 +579,7 @@ file (which caches various information, notably some of the "stat"
579 information for the files involved) will likely need to be refreshed.
580 So after you do a `cp -a` to create a new copy, you'll want to do
581
582 - git-update-cache --refresh
582 + git-update-index --refresh
583 +
584 in the new repository to make sure that the index file is up-to-date.
585
@@ -591,16 +591,16 @@ When copying a remote repository, you'll want to at a minimum update the
591 index cache when you do this, and especially with other peoples'
592 repositories you often want to make sure that the index cache is in some
593 known state (you don't know *what* they've done and not yet checked in),
594 -so usually you'll precede the `git-update-cache` with a
594 +so usually you'll precede the `git-update-index` with a
595
596 git-read-tree --reset HEAD
597 - git-update-cache --refresh
597 + git-update-index --refresh
598
599 which will force a total index re-build from the tree pointed to by `HEAD`.
600 -It resets the index contents to `HEAD`, and then the `git-update-cache`
600 +It resets the index contents to `HEAD`, and then the `git-update-index`
601 makes sure to match up all index entries with the checked-out files.
602 If the original repository had uncommitted changes in its
603 -working tree, `git-update-cache --refresh` notices them and
603 +working tree, `git-update-index --refresh` notices them and
604 tells you they need to be updated.
605
606 The above can also be written as simply
@@ -610,7 +610,7 @@ The above can also be written as simply
610 and in fact a lot of the common git command combinations can be scripted
611 with the `git xyz` interfaces, and you can learn things by just looking
612 at what the `git-*-script` scripts do (`git reset` is the above two lines
613 -implemented in `git-reset-script`, but some things like `git status` and
613 +implemented in `git-reset`, but some things like `git status` and
614 `git commit` are slightly more complex scripts around the basic git
615 commands).
616
@@ -638,13 +638,13 @@ you have all the git internal files, but you will notice that you don't
638 actually have any of the working tree files to work on. To get
639 those, you'd check them out with
640
641 - git-checkout-cache -u -a
641 + git-checkout-index -u -a
642
643 where the `-u` flag means that you want the checkout to keep the index
644 up-to-date (so that you don't have to refresh it afterward), and the
645 `-a` flag means "check out all files" (if you have a stale copy or an
646 older version of a checked out tree you may also need to add the `-f`
647 -flag first, to tell git-checkout-cache to *force* overwriting of any old
647 +flag first, to tell git-checkout-index to *force* overwriting of any old
648 files).
649
650 Again, this can all be simplified with
@@ -742,7 +742,7 @@ git commit -m 'Some work.' hello
742 ------------------------------------------------
743
744 Here, we just added another line to `hello`, and we used a shorthand for
745 -both going a `git-update-cache hello` and `git commit` by just giving the
745 +both going a `git-update-index hello` and `git commit` by just giving the
746 filename directly to `git commit`. The `-m` flag is to give the
747 commit log message from the command line.
748
@@ -971,7 +971,7 @@ transports', because they do not require any GIT aware smart
971 server like GIT Native transport does. Any stock HTTP server
972 would suffice.
973 +
974 -There are (confusingly enough) `git-ssh-pull` and `git-ssh-push`
974 +There are (confusingly enough) `git-ssh-fetch` and `git-ssh-upload`
975 programs, which are 'commit walkers'; they outlived their
976 usefulness when GIT Native and SSH transports were introduced,
977 and not used by `git pull` or `git push` scripts.
INSTALL
+3 -3
@@ -18,7 +18,7 @@ Issues of note:
18 Tough. Either don't use the wrapper script, or delete the old GNU
19 interactive tools. None of the core git stuff needs the wrapper,
20 it's just a convenient shorthand and while it is documented in some
21 - places, you can always replace "git commit" with "git-commit-script"
21 + places, you can always replace "git commit" with "git-commit"
22 instead.
23
24 But let's face it, most of us don't have GNU interactive tools, and
@@ -41,8 +41,8 @@ Issues of note:
41 can avoid the bignum support by excising git-rev-list support
42 for "--merge-order" (by hand).
43
44 - - "libcurl" and "curl" executable. git-http-pull and
45 - git-fetch-script use them. If you do not use http
44 + - "libcurl" and "curl" executable. git-http-fetch and
45 + git-fetch use them. If you do not use http
46 transfer, you are probabaly OK if you do not have
47 them.
48
Makefile
+77 -75
@@ -57,24 +57,21 @@ SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
57
58 ### --- END CONFIGURATION SECTION ---
59
60 -
61 -
62 -SCRIPTS=git git-merge-one-file-script git-prune-script \
63 - git-pull-script git-tag-script git-resolve-script git-whatchanged \
64 - git-fetch-script git-status-script git-commit-script \
65 - git-log-script git-shortlog git-cvsimport-script git-diff-script \
66 - git-reset-script git-add-script git-checkout-script git-clone-script \
67 - gitk git-cherry git-rebase-script git-relink-script git-repack-script \
68 - git-format-patch-script git-sh-setup-script git-push-script \
69 - git-branch-script git-parse-remote-script git-verify-tag-script \
70 - git-ls-remote-script git-rename-script \
71 - git-request-pull-script git-bisect-script \
72 - git-applymbox git-applypatch
73 -
74 -SCRIPTS += git-count-objects-script
75 -SCRIPTS += git-revert-script
76 -SCRIPTS += git-octopus-script
77 -SCRIPTS += git-archimport-script
60 +SCRIPT_SH = \
61 + git-add.sh git-bisect.sh git-branch.sh git-checkout.sh \
62 + git-cherry.sh git-clone.sh git-commit.sh \
63 + git-count-objects.sh git-diff.sh git-fetch.sh \
64 + git-format-patch.sh git-log.sh git-ls-remote.sh \
65 + git-merge-one-file.sh git-octopus.sh git-parse-remote.sh \
66 + git-prune.sh git-pull.sh git-push.sh git-rebase.sh \
67 + git-repack.sh git-request-pull.sh git-reset.sh \
68 + git-resolve.sh git-revert.sh git-sh-setup.sh git-status.sh \
69 + git-tag.sh git-verify-tag.sh git-whatchanged.sh git.sh \
70 + git-applymbox.sh git-applypatch.sh
71 +
72 +SCRIPT_PERL = \
73 + git-archimport.perl git-cvsimport.perl git-relink.perl \
74 + git-rename.perl git-send-email.perl git-shortlog.perl
75
76 # The ones that do not have to link with lcrypto nor lz.
77 SIMPLE_PROGRAMS = \
@@ -82,56 +79,50 @@ SIMPLE_PROGRAMS = \
79 git-daemon git-var
80
81 # ... and all the rest
85 -PROG= git-update-cache git-diff-files git-init-db git-write-tree \
86 - git-read-tree git-commit-tree git-cat-file git-fsck-cache \
87 - git-checkout-cache git-diff-tree git-rev-tree git-ls-files \
88 - git-ls-tree git-merge-base git-merge-cache \
89 - git-unpack-file git-export git-diff-cache git-convert-cache \
90 - git-ssh-push git-ssh-pull git-rev-list git-mktag \
91 - git-diff-helper git-tar-tree git-local-pull git-hash-object \
92 - git-apply \
93 - git-diff-stages git-rev-parse git-patch-id git-pack-objects \
94 - git-unpack-objects git-verify-pack git-receive-pack git-send-pack \
95 - git-prune-packed git-fetch-pack git-upload-pack git-clone-pack \
96 - git-show-index git-peek-remote git-show-branch \
97 - git-update-server-info git-show-rev-cache git-build-rev-cache \
82 +PROGRAMS = \
83 + git-apply git-build-rev-cache git-cat-file \
84 + git-checkout-index git-clone-pack git-commit-tree \
85 + git-convert-objects git-diff-files \
86 + git-diff-helper git-diff-index git-diff-stages \
87 + git-diff-tree git-export git-fetch-pack git-fsck-objects \
88 + git-hash-object git-init-db \
89 + git-local-fetch git-ls-files git-ls-tree git-merge-base \
90 + git-merge-index git-mktag git-pack-objects git-patch-id \
91 + git-peek-remote git-prune-packed git-read-tree \
92 + git-receive-pack git-rev-list git-rev-parse \
93 + git-rev-tree git-send-pack git-show-branch \
94 + git-show-index git-show-rev-cache git-ssh-fetch \
95 + git-ssh-upload git-tar-tree git-unpack-file \
96 + git-unpack-objects git-update-index git-update-server-info \
97 + git-upload-pack git-verify-pack git-write-tree \
98 $(SIMPLE_PROGRAMS)
99
100 ifdef WITH_SEND_EMAIL
101 -SCRIPTS += git-send-email-script
101 + SCRIPT_PERL += git-send-email.perl
102 endif
103
104 ifndef NO_CURL
105 - PROG+= git-http-pull
105 + PROGRAMS += git-http-fetch
106 endif
107
108 LIB_FILE=libgit.a
109 -LIB_H=cache.h object.h blob.h tree.h commit.h tag.h delta.h epoch.h csum-file.h \
110 - pack.h pkt-line.h refs.h
111 -LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o \
112 - tag.o date.o index.o diff-delta.o patch-delta.o entry.o path.o \
113 - refs.o csum-file.o pack-check.o pkt-line.o connect.o ident.o \
114 - sha1_name.o setup.o
115 -
116 -LIB_H += rev-cache.h
117 -LIB_OBJS += rev-cache.o
109
119 -LIB_H += run-command.h
120 -LIB_OBJS += run-command.o
110 +LIB_H = \
111 + blob.h cache.h commit.h count-delta.h csum-file.h delta.h \
112 + diff.h epoch.h object.h pack.h pkt-line.h quote.h refs.h \
113 + rev-cache.h run-command.h strbuf.h tag.h tree.h
114
122 -LIB_H += strbuf.h
123 -LIB_OBJS += strbuf.o
115 +DIFF_OBJS = \
116 + diff.o diffcore-break.o diffcore-order.o diffcore-pathspec.o \
117 + diffcore-pickaxe.o diffcore-rename.o
118
125 -LIB_H += quote.h
126 -LIB_OBJS += quote.o
127 -
128 -LIB_H += diff.h count-delta.h
129 -DIFF_OBJS = diff.o diffcore-rename.o diffcore-pickaxe.o diffcore-pathspec.o \
130 - diffcore-break.o diffcore-order.o
131 -LIB_OBJS += $(DIFF_OBJS) count-delta.o
132 -
133 -LIB_OBJS += gitenv.o
134 -LIB_OBJS += server-info.o
119 +LIB_OBJS = \
120 + blob.o commit.o connect.o count-delta.o csum-file.o \
121 + date.o diff-delta.o entry.o gitenv.o ident.o index.o \
122 + object.o pack-check.o patch-delta.o path.o pkt-line.o \
123 + quote.o read-cache.o refs.o rev-cache.o run-command.o \
124 + server-info.o setup.o sha1_file.o sha1_name.o strbuf.o \
125 + tag.o tree.o usage.o $(DIFF_OBJS)
126
127 LIBS = $(LIB_FILE)
128 LIBS += -lz
@@ -143,11 +134,11 @@ endif
134
135 ifndef NO_OPENSSL
136 LIB_OBJS += epoch.o
146 - OPENSSL_LIBSSL=-lssl
137 + OPENSSL_LIBSSL = -lssl
138 else
139 DEFINES += '-DNO_OPENSSL'
149 - MOZILLA_SHA1=1
150 - OPENSSL_LIBSSL=
140 + MOZILLA_SHA1 = 1
141 + OPENSSL_LIBSSL =
142 endif
143 ifdef NEEDS_SSL_WITH_CRYPTO
144 LIB_4_CRYPTO = -lcrypto -lssl
@@ -160,25 +151,25 @@ else
151 LIB_4_ICONV =
152 endif
153 ifdef MOZILLA_SHA1
163 - SHA1_HEADER="mozilla-sha1/sha1.h"
154 + SHA1_HEADER = "mozilla-sha1/sha1.h"
155 LIB_OBJS += mozilla-sha1/sha1.o
156 else
157 ifdef PPC_SHA1
167 - SHA1_HEADER="ppc/sha1.h"
158 + SHA1_HEADER = "ppc/sha1.h"
159 LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o
160 else
170 - SHA1_HEADER=<openssl/sha.h>
161 + SHA1_HEADER = <openssl/sha.h>
162 LIBS += $(LIB_4_CRYPTO)
163 endif
164 endif
165
166 DEFINES += '-DSHA1_HEADER=$(SHA1_HEADER)'
167
177 -
168 +SCRIPTS = $(SCRIPT_SH) $(SCRIPT_PERL) gitk
169
170 ### Build rules
171
181 -all: $(PROG)
172 +all: $(PROGRAMS)
173
174 all:
175 $(MAKE) -C templates
@@ -196,12 +187,12 @@ $(SIMPLE_PROGRAMS) : $(LIB_FILE)
187 $(SIMPLE_PROGRAMS) : git-% : %.o
188 $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIB_FILE) $(SIMPLE_LIB)
189
199 -git-http-pull: pull.o
200 -git-local-pull: pull.o
201 -git-ssh-pull: rsh.o pull.o
202 -git-ssh-push: rsh.o
190 +git-http-fetch: fetch.o
191 +git-local-fetch: fetch.o
192 +git-ssh-fetch: rsh.o fetch.o
193 +git-ssh-upload: rsh.o
194
204 -git-http-pull: LIBS += -lcurl
195 +git-http-fetch: LIBS += -lcurl
196 git-rev-list: LIBS += $(OPENSSL_LIBSSL)
197
198 init-db.o: init-db.c
@@ -209,7 +200,7 @@ init-db.o: init-db.c
200 -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir)"' $*.c
201
202 $(LIB_OBJS): $(LIB_H)
212 -$(patsubst git-%,%.o,$(PROG)): $(LIB_H)
203 +$(patsubst git-%,%.o,$(PROGRAMS)): $(LIB_H)
204 $(DIFF_OBJS): diffcore.h
205
206 $(LIB_FILE): $(LIB_OBJS)
@@ -219,7 +210,6 @@ doc:
210 $(MAKE) -C Documentation all
211
212
222 -
213 ### Testing rules
214
215 test: all
@@ -238,10 +228,22 @@ check:
228
229 ### Installation rules
230
241 -install: $(PROG) $(SCRIPTS)
231 +install: $(PROGRAMS) $(SCRIPTS)
232 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
243 - $(INSTALL) $(PROG) $(SCRIPTS) $(DESTDIR)$(bindir)
244 - $(INSTALL) git-revert-script $(DESTDIR)$(bindir)/git-cherry-pick-script
233 + $(INSTALL) $(PROGRAMS) $(DESTDIR)$(bindir)
234 + @for s in $(SCRIPTS); \
235 + do \
236 + case "$$s" in \
237 + *.*) \
238 + e=`expr "$$s" : '\(.*\)\.[^.]*$$'` ;; \
239 + *) \
240 + e="$$s" ;; \
241 + esac && \
242 + echo ": install $$s $(DESTDIR)$(bindir)/$$e" && \
243 + $(INSTALL) $$s $(DESTDIR)$(bindir)/$$e || exit; \
244 + done
245 + $(INSTALL) git-revert.sh $(DESTDIR)$(bindir)/git-cherry-pick
246 + sh ./cmd-rename.sh $(DESTDIR)$(bindir)
247 $(MAKE) -C templates install
248
249 install-doc:
@@ -276,7 +278,7 @@ deb: dist
278 ### Cleaning rules
279
280 clean:
279 - rm -f *.o mozilla-sha1/*.o ppc/*.o $(PROG) $(LIB_FILE)
281 + rm -f *.o mozilla-sha1/*.o ppc/*.o $(PROGRAMS) $(LIB_FILE)
282 rm -f git-core.spec
283 rm -rf $(GIT_TARNAME)
284 rm -f $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
README
+13 -13
@@ -81,7 +81,7 @@ size> + <byte\0> + <binary object data>.
81
82 The structured objects can further have their structure and
83 connectivity to other objects verified. This is generally done with
84 -the `git-fsck-cache` program, which generates a full dependency graph
84 +the `git-fsck-objects` program, which generates a full dependency graph
85 of all objects, and verifies their internal consistency (in addition
86 to just verifying their superficial consistency through the hash).
87
@@ -104,7 +104,7 @@ object. The object is totally independent of its location in the
104 directory tree, and renaming a file does not change the object that
105 file is associated with in any way.
106
107 -A blob is typically created when link:git-update-cache.html[git-update-cache]
107 +A blob is typically created when link:git-update-index.html[git-update-index]
108 is run, and its data can be accessed by link:git-cat-file.html[git-cat-file].
109
110 Tree Object
@@ -218,7 +218,7 @@ verification) has to come from outside.
218 A tag is created with link:git-mktag.html[git-mktag],
219 its data can be accessed by link:git-cat-file.html[git-cat-file],
220 and the signature can be verified by
221 -link:git-verify-tag-script.html[git-verify-tag].
221 +link:git-verify-tag.html[git-verify-tag].
222
223
224 The "index" aka "Current Directory Cache"
@@ -286,11 +286,11 @@ main combinations:
286 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
287
288 You update the index with information from the working directory with
289 -the link:git-update-cache.html[git-update-cache] command. You
289 +the link:git-update-index.html[git-update-index] command. You
290 generally update the index information by just specifying the filename
291 you want to update, like so:
292
293 - git-update-cache filename
293 + git-update-index filename
294
295 but to avoid common mistakes with filename globbing etc, the command
296 will not normally add totally new entries or remove old entries,
@@ -307,7 +307,7 @@ removed. The only thing `--remove` means is that update-cache will be
307 considering a removed file to be a valid thing, and if the file really
308 does not exist any more, it will update the index accordingly.
309
310 -As a special case, you can also do `git-update-cache --refresh`, which
310 +As a special case, you can also do `git-update-index --refresh`, which
311 will refresh the "stat" information of each index to match the current
312 stat information. It will 'not' update the object status itself, and
313 it will only update the fields that are used to quickly test whether
@@ -347,18 +347,18 @@ You update your working directory from the index by "checking out"
347 files. This is not a very common operation, since normally you'd just
348 keep your files updated, and rather than write to your working
349 directory, you'd tell the index files about the changes in your
350 -working directory (i.e. `git-update-cache`).
350 +working directory (i.e. `git-update-index`).
351
352 However, if you decide to jump to a new version, or check out somebody
353 else's version, or just restore a previous tree, you'd populate your
354 index file with read-tree, and then you need to check out the result
355 with
356
357 - git-checkout-cache filename
357 + git-checkout-index filename
358
359 or, if you want to check out all of the index, use `-a`.
360
361 -NOTE! git-checkout-cache normally refuses to overwrite old files, so
361 +NOTE! git-checkout-index normally refuses to overwrite old files, so
362 if you have an old version of the tree already checked out, you will
363 need to use the "-f" flag ('before' the "-a" flag or the filename) to
364 'force' the checkout.
@@ -530,17 +530,17 @@ the merge result makes sense, you can tell git what the final
530 merge result for this file is by:
531
532 mv -f hello.c~2 hello.c
533 - git-update-cache hello.c
533 + git-update-index hello.c
534
535 -When a path is in unmerged state, running `git-update-cache` for
535 +When a path is in unmerged state, running `git-update-index` for
536 that path tells git to mark the path resolved.
537
538 The above is the description of a git merge at the lowest level,
539 to help you understand what conceptually happens under the hood.
540 In practice, nobody, not even git itself, uses three `git-cat-file`
541 -for this. There is `git-merge-cache` program that extracts the
541 +for this. There is `git-merge-index` program that extracts the
542 stages to temporary files and calls a `merge` script on it
543
544 - git-merge-cache git-merge-one-file-script hello.c
544 + git-merge-index git-merge-one-file hello.c
545
546 and that is what higher level `git resolve` is implemented with.
checkout-index.c renamed
+7 -7
@@ -5,22 +5,22 @@
5 *
6 * Careful: order of argument flags does matter. For example,
7 *
8 - * git-checkout-cache -a -f file.c
8 + * git-checkout-index -a -f file.c
9 *
10 * Will first check out all files listed in the cache (but not
11 * overwrite any old ones), and then force-checkout "file.c" a
12 * second time (ie that one _will_ overwrite any old contents
13 * with the same filename).
14 *
15 - * Also, just doing "git-checkout-cache" does nothing. You probably
16 - * meant "git-checkout-cache -a". And if you want to force it, you
17 - * want "git-checkout-cache -f -a".
15 + * Also, just doing "git-checkout-index" does nothing. You probably
16 + * meant "git-checkout-index -a". And if you want to force it, you
17 + * want "git-checkout-index -f -a".
18 *
19 * Intuitiveness is not the goal here. Repeatability is. The
20 * reason for the "no arguments means no work" thing is that
21 * from scripts you are supposed to be able to do things like
22 *
23 - * find . -name '*.h' -print0 | xargs -0 git-checkout-cache -f --
23 + * find . -name '*.h' -print0 | xargs -0 git-checkout-index -f --
24 *
25 * which will force all existing *.h files to be replaced with
26 * their cached copies. If an empty command line implied "all",
@@ -50,7 +50,7 @@ static int checkout_file(const char *name)
50 if (!state.quiet) {
51 pos = -pos - 1;
52 fprintf(stderr,
53 - "git-checkout-cache: %s is %s.\n",
53 + "git-checkout-index: %s is %s.\n",
54 name,
55 (pos < active_nr &&
56 !strcmp(active_cache[pos]->name, name)) ?
@@ -76,7 +76,7 @@ static int checkout_all(void)
76 }
77
78 static const char checkout_cache_usage[] =
79 -"git-checkout-cache [-u] [-q] [-a] [-f] [-n] [--prefix=<string>] [--] <file>...";
79 +"git-checkout-index [-u] [-q] [-a] [-f] [-n] [--prefix=<string>] [--] <file>...";
80
81 static struct cache_file cache_file;
82
cmd-rename.sh new
+53
@@ -0,0 +1,53 @@
1 +#!/bin/sh
2 +d="$1"
3 +test -d "$d" || exit
4 +while read old new
5 +do
6 + rm -f "$d/$old"
7 + ln -s "$new" "$d/$old"
8 +done <<\EOF
9 +git-add-script git-add
10 +git-archimport-script git-archimport
11 +git-bisect-script git-bisect
12 +git-branch-script git-branch
13 +git-checkout-script git-checkout
14 +git-cherry-pick-script git-cherry-pick
15 +git-clone-script git-clone
16 +git-commit-script git-commit
17 +git-count-objects-script git-count-objects
18 +git-cvsimport-script git-cvsimport
19 +git-diff-script git-diff
20 +git-send-email-script git-send-email
21 +git-fetch-script git-fetch
22 +git-format-patch-script git-format-patch
23 +git-log-script git-log
24 +git-ls-remote-script git-ls-remote
25 +git-merge-one-file-script git-merge-one-file
26 +git-octopus-script git-octopus
27 +git-parse-remote-script git-parse-remote
28 +git-prune-script git-prune
29 +git-pull-script git-pull
30 +git-push-script git-push
31 +git-rebase-script git-rebase
32 +git-relink-script git-relink
33 +git-rename-script git-rename
34 +git-repack-script git-repack
35 +git-request-pull-script git-request-pull
36 +git-reset-script git-reset
37 +git-resolve-script git-resolve
38 +git-revert-script git-revert
39 +git-sh-setup-script git-sh-setup
40 +git-status-script git-status
41 +git-tag-script git-tag
42 +git-verify-tag-script git-verify-tag
43 +git-http-pull git-http-fetch
44 +git-local-pull git-local-fetch
45 +git-ssh-pull git-ssh-fetch
46 +git-checkout-cache git-checkout-index
47 +git-diff-cache git-diff-index
48 +git-merge-cache git-merge-index
49 +git-update-cache git-update-index
50 +git-ssh-push git-ssh-upload
51 +git-convert-cache git-convert-objects
52 +git-fsck-cache git-fsck-objects
53 +EOF
convert-objects.c renamed
+1 -1
@@ -318,7 +318,7 @@ int main(int argc, char **argv)
318 struct entry *entry;
319
320 if (argc != 2 || get_sha1(argv[1], sha1))
321 - usage("git-convert-cache <sha1>");
321 + usage("git-convert-objects <sha1>");
322
323 entry = convert_entry(sha1);
324 printf("new sha1: %s\n", sha1_to_hex(entry->new_sha1));
debian/changelog
+1 -1
@@ -6,7 +6,7 @@ git-core (0.99.6-0) unstable; urgency=low
6
7 git-core (0.99.5-1) unstable; urgency=low
8
9 - * Enable git-send-email-script on Debian. There is no reason to shy
9 + * Enable git-send-email on Debian. There is no reason to shy
10 away from it, since we have the necessary Perl modules available.
11
12 -- Junio C Hamano <junkio@cox.net> Thu, 25 Aug 2005 14:16:59 -0700
diff-index.c renamed
+1 -1
@@ -164,7 +164,7 @@ static void mark_merge_entries(void)
164 }
165
166 static const char diff_cache_usage[] =
167 -"git-diff-cache [-m] [--cached] "
167 +"git-diff-index [-m] [--cached] "
168 "[<common diff options>] <tree-ish> [<path>...]"
169 COMMON_DIFF_OPTIONS_HELP;
170
entry.c
+6 -6
@@ -76,7 +76,7 @@ static int write_entry(struct cache_entry *ce, const char *path, struct checkout
76 if (!new || strcmp(type, "blob")) {
77 if (new)
78 free(new);
79 - return error("git-checkout-cache: unable to read sha1 file of %s (%s)",
79 + return error("git-checkout-index: unable to read sha1 file of %s (%s)",
80 path, sha1_to_hex(ce->sha1));
81 }
82 switch (ntohl(ce->ce_mode) & S_IFMT) {
@@ -84,28 +84,28 @@ static int write_entry(struct cache_entry *ce, const char *path, struct checkout
84 fd = create_file(path, ntohl(ce->ce_mode));
85 if (fd < 0) {
86 free(new);
87 - return error("git-checkout-cache: unable to create file %s (%s)",
87 + return error("git-checkout-index: unable to create file %s (%s)",
88 path, strerror(errno));
89 }
90 wrote = write(fd, new, size);
91 close(fd);
92 free(new);
93 if (wrote != size)
94 - return error("git-checkout-cache: unable to write file %s", path);
94 + return error("git-checkout-index: unable to write file %s", path);
95 break;
96 case S_IFLNK:
97 memcpy(target, new, size);
98 target[size] = '\0';
99 if (symlink(target, path)) {
100 free(new);
101 - return error("git-checkout-cache: unable to create symlink %s (%s)",
101 + return error("git-checkout-index: unable to create symlink %s (%s)",
102 path, strerror(errno));
103 }
104 free(new);
105 break;
106 default:
107 free(new);
108 - return error("git-checkout-cache: unknown file mode for %s", path);
108 + return error("git-checkout-index: unknown file mode for %s", path);
109 }
110
111 if (state->refresh_cache) {
@@ -131,7 +131,7 @@ int checkout_entry(struct cache_entry *ce, struct checkout *state)
131 return 0;
132 if (!state->force) {
133 if (!state->quiet)
134 - fprintf(stderr, "git-checkout-cache: %s already exists\n", path);
134 + fprintf(stderr, "git-checkout-index: %s already exists\n", path);
135 return 0;
136 }
137
fetch.c renamed
+1 -1
@@ -1,4 +1,4 @@
1 -#include "pull.h"
1 +#include "fetch.h"
2
3 #include "cache.h"
4 #include "commit.h"
fetch.h renamed
fsck-objects.c renamed
+6 -6
@@ -162,28 +162,28 @@ static int fsck_tree(struct tree *item)
162
163 retval = 0;
164 if (has_full_path) {
165 - fprintf(stderr, "warning: git-fsck-cache: tree %s "
165 + fprintf(stderr, "warning: git-fsck-objects: tree %s "
166 "has full pathnames in it\n",
167 sha1_to_hex(item->object.sha1));
168 }
169 if (has_zero_pad) {
170 - fprintf(stderr, "warning: git-fsck-cache: tree %s "
170 + fprintf(stderr, "warning: git-fsck-objects: tree %s "
171 "has zero-padded file modes in it\n",
172 sha1_to_hex(item->object.sha1));
173 }
174 if (has_bad_modes) {
175 - fprintf(stderr, "warning: git-fsck-cache: tree %s "
175 + fprintf(stderr, "warning: git-fsck-objects: tree %s "
176 "has bad file modes in it\n",
177 sha1_to_hex(item->object.sha1));
178 }
179 if (has_dup_entries) {
180 - fprintf(stderr, "error: git-fsck-cache: tree %s "
180 + fprintf(stderr, "error: git-fsck-objects: tree %s "
181 "has duplicate file entries\n",
182 sha1_to_hex(item->object.sha1));
183 retval = -1;
184 }
185 if (not_properly_sorted) {
186 - fprintf(stderr, "error: git-fsck-cache: tree %s "
186 + fprintf(stderr, "error: git-fsck-objects: tree %s "
187 "is not properly sorted\n",
188 sha1_to_hex(item->object.sha1));
189 retval = -1;
@@ -448,7 +448,7 @@ int main(int argc, char **argv)
448 continue;
449 }
450 if (*arg == '-')
451 - usage("git-fsck-cache [--tags] [--root] [[--unreachable] [--cache] [--standalone | --full] [--strict] <head-sha1>*]");
451 + usage("git-fsck-objects [--tags] [--root] [[--unreachable] [--cache] [--standalone | --full] [--strict] <head-sha1>*]");
452 }
453
454 if (standalone && check_full)
git deleted
-20
@@ -1,20 +0,0 @@
1 -#!/bin/sh
2 -
3 -cmd=
4 -path=$(dirname $0)
5 -case "$#" in
6 -0) ;;
7 -*) cmd="$1"
8 - shift
9 - test -x $path/git-$cmd-script && exec $path/git-$cmd-script "$@"
10 - test -x $path/git-$cmd && exec $path/git-$cmd "$@" ;;
11 -esac
12 -
13 -echo "Usage: git COMMAND [OPTIONS] [TARGET]"
14 -if [ -n "$cmd" ]; then
15 - echo " git command '$cmd' not found: commands are:"
16 -else
17 - echo " git commands are:"
18 -fi
19 -
20 -ls $path | sed -ne 's/^git-\(.*\)-script/ \1/p' | fmt
git-add-script deleted
-2
@@ -1,2 +0,0 @@
1 -#!/bin/sh
2 -git-update-cache --add -- "$@"
git-add.sh new
+2
@@ -0,0 +1,2 @@
1 +#!/bin/sh
2 +git-update-index --add -- "$@"
git-applymbox.sh renamed
+2 -2
@@ -18,7 +18,7 @@
18 ## use a Signoff_file, because applypatch wants to append the sign-off
19 ## message to msg-clean every time it is run.
20
21 -. git-sh-setup-script || die "Not a git archive"
21 +. git-sh-setup || die "Not a git archive"
22
23 usage () {
24 echo >&2 "applymbox [-u] [-k] [-q] (-c .dotest/<num> | mbox) [signoff]"
@@ -47,7 +47,7 @@ case "$continue" in
47 shift
48 esac
49
50 -files=$(git-diff-cache --cached --name-only HEAD) || exit
50 +files=$(git-diff-index --cached --name-only HEAD) || exit
51 if [ "$files" ]; then
52 echo "Dirty index: cannot apply patches (dirty: $files)" >&2
53 exit 1
git-applypatch.sh renamed
+1 -1
@@ -10,7 +10,7 @@
10 ## $3 - "info" file with Author, email and subject
11 ## $4 - optional file containing signoff to add
12 ##
13 -. git-sh-setup-script || die "Not a git archive."
13 +. git-sh-setup || die "Not a git archive."
14
15 final=.dotest/final-commit
16 ##
git-archimport.perl renamed
+14 -14
@@ -8,7 +8,7 @@
8 #
9 =head1 Invocation
10
11 - git-archimport-script -i <archive>/<branch> [<archive>/<branch>]
11 + git-archimport -i <archive>/<branch> [<archive>/<branch>]
12 [ <archive>/<branch> ]
13
14 The script expects you to provide the key roots where it can start the
@@ -268,16 +268,16 @@ foreach my $ps (@psets) {
268 # imports don't give us good info
269 # on added files. Shame on them
270 if ($ps->{type} eq 'i' || $ps->{type} eq 't') {
271 - `find . -type f -print0 | grep -zv '^./.git' | xargs -0 -l100 git-update-cache --add`;
272 - `git-ls-files --deleted -z | xargs --no-run-if-empty -0 -l100 git-update-cache --remove`;
271 + `find . -type f -print0 | grep -zv '^./.git' | xargs -0 -l100 git-update-index --add`;
272 + `git-ls-files --deleted -z | xargs --no-run-if-empty -0 -l100 git-update-index --remove`;
273 }
274
275 if (@$add) {
276 while (@$add) {
277 my @slice = splice(@$add, 0, 100);
278 my $slice = join(' ', @slice);
279 - `git-update-cache --add $slice`;
280 - die "Error in git-update-cache --add: $!" if $?;
279 + `git-update-index --add $slice`;
280 + die "Error in git-update-index --add: $!" if $?;
281 }
282 }
283 if (@$del) {
@@ -287,8 +287,8 @@ foreach my $ps (@psets) {
287 while (@$del) {
288 my @slice = splice(@$del, 0, 100);
289 my $slice = join(' ', @slice);
290 - `git-update-cache --remove $slice`;
291 - die "Error in git-update-cache --remove: $!" if $?;
290 + `git-update-index --remove $slice`;
291 + die "Error in git-update-index --remove: $!" if $?;
292 }
293 }
294 if (@$ren) { # renamed
@@ -306,10 +306,10 @@ foreach my $ps (@psets) {
306 #print "moving $from $to";
307 `mv $from $to`;
308 die "Error renaming $from $to : $!" if $?;
309 - `git-update-cache --remove $from`;
310 - die "Error in git-update-cache --remove: $!" if $?;
311 - `git-update-cache --add $to`;
312 - die "Error in git-update-cache --add: $!" if $?;
309 + `git-update-index --remove $from`;
310 + die "Error in git-update-index --remove: $!" if $?;
311 + `git-update-index --add $to`;
312 + die "Error in git-update-index --add: $!" if $?;
313 }
314
315 }
@@ -317,12 +317,12 @@ foreach my $ps (@psets) {
317 while (@$mod) {
318 my @slice = splice(@$mod, 0, 100);
319 my $slice = join(' ', @slice);
320 - `git-update-cache $slice`;
321 - die "Error in git-update-cache: $!" if $?;
320 + `git-update-index $slice`;
321 + die "Error in git-update-index: $!" if $?;
322 }
323 }
324
325 - # warn "errors when running git-update-cache! $!";
325 + # warn "errors when running git-update-index! $!";
326 $tree = `git-write-tree`;
327 die "cannot write tree $!" if $?;
328 chomp $tree;
git-bisect.sh renamed
+1 -1
@@ -1,5 +1,5 @@
1 #!/bin/sh
2 -. git-sh-setup-script || dir "Not a git archive"
2 +. git-sh-setup || dir "Not a git archive"
3
4 usage() {
5 echo >&2 'usage: git bisect [start|bad|good|next|reset|visualize]
git-branch.sh renamed
+1 -1
@@ -1,6 +1,6 @@
1 #!/bin/sh
2
3 -. git-sh-setup-script || die "Not a git archive"
3 +. git-sh-setup || die "Not a git archive"
4
5 case "$#" in
6 0)
git-checkout.sh renamed
+2 -2
@@ -1,5 +1,5 @@
1 #!/bin/sh
2 -. git-sh-setup-script || die "Not a git archive"
2 +. git-sh-setup || die "Not a git archive"
3
4 old=$(git-rev-parse HEAD)
5 new=
@@ -53,7 +53,7 @@ done
53 if [ "$force" ]
54 then
55 git-read-tree --reset $new &&
56 - git-checkout-cache -q -f -u -a
56 + git-checkout-index -q -f -u -a
57 else
58 git-read-tree -m -u $old $new
59 fi
git-cherry.sh renamed
+1 -1
@@ -3,7 +3,7 @@
3 # Copyright (c) 2005 Junio C Hamano.
4 #
5
6 -. git-sh-setup-script || die "Not a git archive."
6 +. git-sh-setup || die "Not a git archive."
7
8 usage="usage: $0 "'[-v] <upstream> [<head>]
9
git-clone.sh renamed
+1 -1
@@ -50,7 +50,7 @@ Perhaps git-update-server-info needs to be run there?"
50 while read sha1 refname
51 do
52 name=`expr "$refname" : 'refs/\(.*\)'` &&
53 - git-http-pull -v -a -w "$name" "$name" "$1/" || exit 1
53 + git-http-fetch -v -a -w "$name" "$name" "$1/" || exit 1
54 done <"$clone_tmp/refs"
55 rm -fr "$clone_tmp"
56 }
git-commit.sh renamed
+6 -6
@@ -3,7 +3,7 @@
3 # Copyright (c) 2005 Linus Torvalds
4 #
5
6 -. git-sh-setup-script || die "Not a git archive"
6 +. git-sh-setup || die "Not a git archive"
7
8 usage () {
9 die 'git commit [-a] [-v | --no-verify] [-m <message>] [-F <logfile>] [(-C|-c) <commit>] [<path>...]'
@@ -94,16 +94,16 @@ esac
94 case "$all,$#" in
95 t,*)
96 git-diff-files --name-only -z |
97 - xargs -0 git-update-cache -q --remove --
97 + xargs -0 git-update-index -q --remove --
98 ;;
99 ,0)
100 ;;
101 *)
102 git-diff-files --name-only -z "$@" |
103 - xargs -0 git-update-cache -q --remove --
103 + xargs -0 git-update-index -q --remove --
104 ;;
105 esac || exit 1
106 -git-update-cache -q --refresh || exit 1
106 +git-update-index -q --refresh || exit 1
107
108 case "$verify" in
109 t)
@@ -190,11 +190,11 @@ else
190 export GIT_AUTHOR_DATE
191 fi
192 fi
193 -git-status-script >>.editmsg
193 +git-status >>.editmsg
194 if [ "$?" != "0" -a ! -f $GIT_DIR/MERGE_HEAD ]
195 then
196 rm -f .editmsg
197 - git-status-script
197 + git-status
198 exit 1
199 fi
200 case "$no_edit" in
git-count-objects.sh renamed
+1 -1
@@ -1,6 +1,6 @@
1 #!/bin/sh
2
3 -. git-sh-setup-script
3 +. git-sh-setup
4
5 echo $(find "$GIT_DIR/objects"/?? -type f -print | wc -l) objects, \
6 $({
git-cvsimport.perl renamed
+2 -2
@@ -522,7 +522,7 @@ my $commit = sub {
522 @o2 = @old;
523 @old = ();
524 }
525 - system("git-update-cache","--force-remove","--",@o2);
525 + system("git-update-index","--force-remove","--",@o2);
526 die "Cannot remove files: $?\n" if $?;
527 }
528 while(@new) {
@@ -533,7 +533,7 @@ my $commit = sub {
533 @n2 = @new;
534 @new = ();
535 }
536 - system("git-update-cache","--add",
536 + system("git-update-index","--add",
537 (map { ('--cacheinfo', @$_) } @n2));
538 die "Cannot add files: $?\n" if $?;
539 }
git-diff.sh renamed
+1 -1
@@ -22,7 +22,7 @@ case "$rev" in
22 cmd="git-diff-tree $flags $rev $files"
23 ;;
24 ?*' ')
25 - cmd="git-diff-cache $flags $rev $files"
25 + cmd="git-diff-index $flags $rev $files"
26 ;;
27 '')
28 cmd="git-diff-files $flags $files"
git-fetch.sh renamed
+3 -3
@@ -1,7 +1,7 @@
1 #!/bin/sh
2 #
3 -. git-sh-setup-script || die "Not a git archive"
4 -. git-parse-remote-script
3 +. git-sh-setup || die "Not a git archive"
4 +. git-parse-remote
5 _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
6 _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
7
@@ -178,7 +178,7 @@ do
178 expr "$head" : "$_x40\$" >/dev/null ||
179 die "Failed to fetch $remote_name from $remote"
180 echo Fetching "$remote_name from $remote" using http
181 - git-http-pull -v -a "$head" "$remote/" || exit
181 + git-http-fetch -v -a "$head" "$remote/" || exit
182 ;;
183 rsync://*)
184 TMP_HEAD="$GIT_DIR/TMP_HEAD"
git-format-patch.sh renamed
+1 -1
@@ -3,7 +3,7 @@
3 # Copyright (c) 2005 Junio C Hamano
4 #
5
6 -. git-sh-setup-script || die "Not a git archive."
6 +. git-sh-setup || die "Not a git archive."
7
8 usage () {
9 echo >&2 "usage: $0"' [-n] [-o dir] [--keep-subject] [--mbox] [--check] [--signoff] [-<diff options>...] upstream [ our-head ]
git-log.sh renamed
git-ls-remote.sh renamed
+2 -2
@@ -1,6 +1,6 @@
1 #!/bin/sh
2 #
3 -. git-sh-setup-script || die "Not a git archive"
3 +. git-sh-setup || die "Not a git archive"
4
5 usage () {
6 echo >&2 "usage: $0 [--heads] [--tags] <repository> <refs>..."
@@ -29,7 +29,7 @@ case ",$heads,$tags," in
29 ,,,) heads=heads tags=tags other=other ;;
30 esac
31
32 -. git-parse-remote-script
32 +. git-parse-remote
33 peek_repo="$(get_remote_url "$@")"
34 shift
35
git-merge-one-file.sh renamed
+8 -8
@@ -27,7 +27,7 @@ case "${1:-.}${2:-.}${3:-.}" in
27 if test -f "$4"; then
28 rm -f -- "$4"
29 fi &&
30 - exec git-update-cache --remove -- "$4"
30 + exec git-update-index --remove -- "$4"
31 ;;
32
33 #
@@ -35,8 +35,8 @@ case "${1:-.}${2:-.}${3:-.}" in
35 #
36 ".$2." | "..$3" )
37 echo "Adding $4"
38 - git-update-cache --add --cacheinfo "$6$7" "$2$3" "$4" &&
39 - exec git-checkout-cache -u -f -- "$4"
38 + git-update-index --add --cacheinfo "$6$7" "$2$3" "$4" &&
39 + exec git-checkout-index -u -f -- "$4"
40 ;;
41
42 #
@@ -49,8 +49,8 @@ case "${1:-.}${2:-.}${3:-.}" in
49 exit 1
50 fi
51 echo "Adding $4"
52 - git-update-cache --add --cacheinfo "$6" "$2" "$4" &&
53 - exec git-checkout-cache -u -f -- "$4"
52 + git-update-index --add --cacheinfo "$6" "$2" "$4" &&
53 + exec git-checkout-index -u -f -- "$4"
54 ;;
55
56 #
@@ -63,8 +63,8 @@ case "${1:-.}${2:-.}${3:-.}" in
63
64 # We reset the index to the first branch, making
65 # git-diff-file useful
66 - git-update-cache --add --cacheinfo "$6" "$2" "$4"
67 - git-checkout-cache -u -f -- "$4" &&
66 + git-update-index --add --cacheinfo "$6" "$2" "$4"
67 + git-checkout-index -u -f -- "$4" &&
68 merge "$4" "$orig" "$src2"
69 ret=$?
70 rm -f -- "$orig" "$src2"
@@ -78,7 +78,7 @@ case "${1:-.}${2:-.}${3:-.}" in
78 echo "ERROR: Merge conflict in $4."
79 exit 1
80 fi
81 - exec git-update-cache -- "$4"
81 + exec git-update-index -- "$4"
82 ;;
83
84 *)
git-octopus.sh renamed
+5 -5
@@ -4,7 +4,7 @@
4 #
5 # Resolve two or more trees recorded in $GIT_DIR/FETCH_HEAD.
6 #
7 -. git-sh-setup-script || die "Not a git archive"
7 +. git-sh-setup || die "Not a git archive"
8
9 usage () {
10 die "usage: git octopus"
@@ -19,9 +19,9 @@ done <"$GIT_DIR/FETCH_HEAD"
19
20 head=$(git-rev-parse --verify HEAD) || exit
21
22 -git-update-cache --refresh ||
22 +git-update-index --refresh ||
23 die "Your working tree is dirty."
24 -test "$(git-diff-cache --cached "$head")" = "" ||
24 +test "$(git-diff-index --cached "$head")" = "" ||
25 die "Your working tree does not match HEAD."
26
27 # MRC is the current "merge reference commit"
@@ -68,9 +68,9 @@ do
68 if test $? -ne 0
69 then
70 echo "Simple merge did not work, trying automatic merge."
71 - git-merge-cache -o git-merge-one-file-script -a || {
71 + git-merge-index -o git-merge-one-file -a || {
72 git-read-tree --reset "$head"
73 - git-checkout-cache -f -q -u -a
73 + git-checkout-index -f -q -u -a
74 die "Automatic merge failed; should not be doing Octopus"
75 }
76 next=$(git-write-tree 2>/dev/null)
git-parse-remote.sh renamed
+1 -1
@@ -1,6 +1,6 @@
1 #!/bin/sh
2
3 -. git-sh-setup-script || die "Not a git archive"
3 +. git-sh-setup || die "Not a git archive"
4
5 get_data_source () {
6 case "$1" in
git-prune.sh renamed
+3 -3
@@ -1,6 +1,6 @@
1 #!/bin/sh
2
3 -. git-sh-setup-script || die "Not a git archive"
3 +. git-sh-setup || die "Not a git archive"
4
5 dryrun=
6 echo=
@@ -9,13 +9,13 @@ do
9 case "$1" in
10 -n) dryrun=-n echo=echo ;;
11 --) break ;;
12 - -*) echo >&2 "usage: git-prune-script [ -n ] [ heads... ]"; exit 1 ;;
12 + -*) echo >&2 "usage: git-prune [ -n ] [ heads... ]"; exit 1 ;;
13 *) break ;;
14 esac
15 shift;
16 done
17
18 -git-fsck-cache --full --cache --unreachable "$@" |
18 +git-fsck-objects --full --cache --unreachable "$@" |
19 sed -ne '/unreachable /{
20 s/unreachable [^ ][^ ]* //
21 s|\(..\)|\1/|p
git-pull.sh renamed
+4 -4
@@ -4,10 +4,10 @@
4 #
5 # Fetch one or more remote refs and merge it/them into the current HEAD.
6
7 -. git-sh-setup-script || die "Not a git archive"
7 +. git-sh-setup || die "Not a git archive"
8
9 orig_head=$(cat "$GIT_DIR/HEAD") || die "Pulling into a black hole?"
10 -git-fetch-script --update-head-ok "$@" || exit 1
10 +git-fetch --update-head-ok "$@" || exit 1
11
12 curr_head=$(cat "$GIT_DIR/HEAD")
13 if test "$curr_head" != "$orig_head"
@@ -35,10 +35,10 @@ case "$merge_head" in
35 ;;
36 *' '?*)
37 echo >&2 "Pulling more than one heads; making an Octopus."
38 - exec git-octopus-script
38 + exec git-octopus
39 ;;
40 esac
41
42 -git-resolve-script \
42 +git-resolve \
43 "$(cat "$GIT_DIR"/HEAD)" \
44 $merge_head "Merge $merge_name"
git-push.sh renamed
+2 -2
@@ -1,5 +1,5 @@
1 #!/bin/sh
2 -. git-sh-setup-script || die "Not a git archive"
2 +. git-sh-setup || die "Not a git archive"
3
4 # Parse out parameters and then stop at remote, so that we can
5 # translate it using .git/branches information
@@ -31,7 +31,7 @@ case "$#" in
31 die "Where would you want to push today?" ;;
32 esac
33
34 -. git-parse-remote-script
34 +. git-parse-remote
35 remote=$(get_remote_url "$@")
36 case "$has_all" in
37 --all) set x ;;
git-rebase.sh renamed
+6 -6
@@ -3,7 +3,7 @@
3 # Copyright (c) 2005 Junio C Hamano.
4 #
5
6 -. git-sh-setup-script || die "Not a git archive."
6 +. git-sh-setup || die "Not a git archive."
7
8 usage="usage: $0 "'<upstream> [<head>]
9
@@ -17,7 +17,7 @@ case "$#,$1" in
17 shift ;;
18 esac
19
20 -git-update-cache --refresh || exit
20 +git-update-index --refresh || exit
21
22 case "$#" in
23 1) ours_symbolic=HEAD ;;
@@ -27,8 +27,8 @@ esac
27
28 upstream=`git-rev-parse --verify "$1"` &&
29 ours=`git-rev-parse --verify "$ours_symbolic"` || exit
30 -different1=$(git-diff-cache --name-only --cached "$ours") &&
31 -different2=$(git-diff-cache --name-only "$ours") &&
30 +different1=$(git-diff-index --name-only --cached "$ours") &&
31 +different2=$(git-diff-index --name-only "$ours") &&
32 test "$different1$different2" = "" ||
33 die "Your working tree does not match $ours_symbolic."
34
@@ -51,10 +51,10 @@ do
51 esac
52 echo >&2 "* Applying: $msg"
53 S=`cat "$GIT_DIR/HEAD"` &&
54 - git-cherry-pick-script --replay $commit || {
54 + git-cherry-pick --replay $commit || {
55 echo >&2 "* Not applying the patch and continuing."
56 echo $commit >>$fail
57 - git-reset-script --hard $S
57 + git-reset --hard $S
58 }
59 done
60 if test -s $fail
git-relink.perl renamed
git-rename.perl renamed
+4 -4
@@ -48,11 +48,11 @@ s#^$safesrc(/|$)#$dst$1# for @dstfiles;
48 rename($src,$dst)
49 or die "rename failed: $!";
50
51 -my $rc = system("git-update-cache","--add","--",@dstfiles);
52 -die "git-update-cache failed to add new name with code $?\n" if $rc;
51 +my $rc = system("git-update-index","--add","--",@dstfiles);
52 +die "git-update-index failed to add new name with code $?\n" if $rc;
53
54 -$rc = system("git-update-cache","--remove","--",@srcfiles);
55 -die "git-update-cache failed to remove old name with code $?\n" if $rc;
54 +$rc = system("git-update-index","--remove","--",@srcfiles);
55 +die "git-update-index failed to remove old name with code $?\n" if $rc;
56
57
58 sub usage($) {
git-repack.sh renamed
+1 -1
@@ -3,7 +3,7 @@
3 # Copyright (c) 2005 Linus Torvalds
4 #
5
6 -. git-sh-setup-script || die "Not a git archive"
6 +. git-sh-setup || die "Not a git archive"
7
8 no_update_info= all_into_one= remove_redundant=
9 while case "$#" in 0) break ;; esac
git-request-pull.sh renamed
git-reset.sh renamed
+3 -3
@@ -1,5 +1,5 @@
1 #!/bin/sh
2 -. git-sh-setup-script || die "Not a git archive"
2 +. git-sh-setup || die "Not a git archive"
3
4 tmp=/var/tmp/reset.$$
5 trap 'rm -f $tmp-*' 0 1 2 3 15
@@ -66,7 +66,7 @@ case "$reset_type" in
66 --hard )
67 # Hard reset matches the working tree to that of the tree
68 # being switched to.
69 - git-checkout-cache -f -u -q -a
69 + git-checkout-index -f -u -q -a
70 git-ls-files --cached -z |
71 perl -e '
72 use strict;
@@ -90,7 +90,7 @@ case "$reset_type" in
90 ;; # Nothing else to do
91 --mixed )
92 # Report what has not been updated.
93 - git-update-cache --refresh
93 + git-update-index --refresh
94 ;;
95 esac
96
git-resolve.sh renamed
+4 -4
@@ -4,10 +4,10 @@
4 #
5 # Resolve two trees.
6 #
7 -. git-sh-setup-script || die "Not a git archive"
7 +. git-sh-setup || die "Not a git archive"
8
9 usage () {
10 - die "git-resolve-script <head> <remote> <merge-message>"
10 + die "git-resolve <head> <remote> <merge-message>"
11 }
12
13 dropheads() {
@@ -85,12 +85,12 @@ case "$common" in
85 esac
86
87 echo "Trying to merge $merge into $head using $common."
88 -git-update-cache --refresh 2>/dev/null
88 +git-update-index --refresh 2>/dev/null
89 git-read-tree -u -m $common $head $merge || exit 1
90 result_tree=$(git-write-tree 2> /dev/null)
91 if [ $? -ne 0 ]; then
92 echo "Simple merge failed, trying Automatic merge"
93 - git-merge-cache -o git-merge-one-file-script -a
93 + git-merge-index -o git-merge-one-file -a
94 if [ $? -ne 0 ]; then
95 echo $merge > "$GIT_DIR"/MERGE_HEAD
96 die "Automatic merge failed, fix up by hand"
git-revert.sh renamed
+7 -5
@@ -3,13 +3,15 @@
3 # Copyright (c) 2005 Linus Torvalds
4 # Copyright (c) 2005 Junio C Hamano
5 #
6 -. git-sh-setup-script || die "Not a git archive"
6 +. git-sh-setup || die "Not a git archive"
7
8 case "$0" in
9 -*-revert-* )
9 +*-revert* )
10 me=revert ;;
11 -*-cherry-pick-* )
11 +*-cherry-pick* )
12 me=cherry-pick ;;
13 +* )
14 + die "What are ou talking about?" ;;
15 esac
16
17 usage () {
@@ -135,7 +137,7 @@ echo >&2 "First trying simple merge strategy to $me."
137 git-read-tree -m -u $base $head $next &&
138 result=$(git-write-tree 2>/dev/null) || {
139 echo >&2 "Simple $me fails; trying Automatic $me."
138 - git-merge-cache -o git-merge-one-file-script -a || {
140 + git-merge-index -o git-merge-one-file -a || {
141 echo >&2 "Automatic $me failed. After fixing it up,"
142 echo >&2 "you can use \"git commit -F .msg\""
143 case "$me" in
@@ -158,7 +160,7 @@ echo >&2 "Finished one $me."
160
161 case "$no_commit" in
162 '')
161 - git-commit-script -n -F .msg
163 + git-commit -n -F .msg
164 rm -f .msg
165 ;;
166 esac
git-send-email.perl renamed
+2 -2
@@ -188,7 +188,7 @@ if (@files) {
188 print $_,"\n" for @files;
189 } else {
190 print <<EOT;
191 -git-send-email-script [options] <file | directory> [... file | directory ]
191 +git-send-email [options] <file | directory> [... file | directory ]
192 Options:
193 --from Specify the "From:" line of the email to be sent.
194
@@ -257,7 +257,7 @@ sub send_message
257 'Reply-to' => $from,
258 'In-Reply-To' => $reply_to,
259 'Message-ID' => $message_id,
260 - 'X-Mailer' => "git-send-email-script",
260 + 'X-Mailer' => "git-send-email",
261 );
262
263 $mail{smtp} = $smtp_server;
git-sh-setup.sh renamed
+2 -2
@@ -12,8 +12,8 @@ die() {
12 }
13
14 check_clean_tree() {
15 - dirty1_=`git-update-cache -q --refresh` && {
16 - dirty2_=`git-diff-cache --name-only --cached HEAD`
15 + dirty1_=`git-update-index -q --refresh` && {
16 + dirty2_=`git-diff-index --name-only --cached HEAD`
17 case "$dirty2_" in '') : ;; *) (exit 1) ;; esac
18 } || {
19 echo >&2 "$dirty1_"
git-shortlog.perl renamed
git-status.sh renamed
+4 -4
@@ -2,7 +2,7 @@
2 #
3 # Copyright (c) 2005 Linus Torvalds
4 #
5 -. git-sh-setup-script || die "Not a git archive"
5 +. git-sh-setup || die "Not a git archive"
6
7 report () {
8 header="#
@@ -37,11 +37,11 @@ refs/heads/master) ;;
37 *) echo "# On branch $branch" ;;
38 esac
39
40 -git-update-cache --refresh >/dev/null 2>&1
40 +git-update-index --refresh >/dev/null 2>&1
41
42 if test -f "$GIT_DIR/HEAD"
43 then
44 - git-diff-cache -M --cached HEAD |
44 + git-diff-index -M --cached HEAD |
45 sed 's/^://' |
46 report "Updated but not checked in" "will commit"
47
@@ -59,7 +59,7 @@ fi
59
60 git-diff-files |
61 sed 's/^://' |
62 -report "Changed but not updated" "use git-update-cache to mark for commit"
62 +report "Changed but not updated" "use git-update-index to mark for commit"
63
64 if grep -v '^#' "$GIT_DIR/info/exclude" >/dev/null 2>&1
65 then
git-tag.sh renamed
+2 -2
@@ -1,10 +1,10 @@
1 #!/bin/sh
2 # Copyright (c) 2005 Linus Torvalds
3
4 -. git-sh-setup-script || die "Not a git archive"
4 +. git-sh-setup || die "Not a git archive"
5
6 usage () {
7 - echo >&2 "Usage: git-tag-script [-a | -s] [-f] [-m "tag message"] tagname"
7 + echo >&2 "Usage: git-tag [-a | -s] [-f] [-m "tag message"] tagname"
8 exit 1
9 }
10
git-verify-tag.sh renamed
+1 -1
@@ -1,5 +1,5 @@
1 #!/bin/sh
2 -. git-sh-setup-script || die "Not a git archive"
2 +. git-sh-setup || die "Not a git archive"
3
4 tag=$(git-rev-parse $1) || exit 1
5
git-whatchanged.sh renamed
git.sh new
+27
@@ -0,0 +1,27 @@
1 +#!/bin/sh
2 +
3 +cmd=
4 +path=$(dirname $0)
5 +case "$#" in
6 +0) ;;
7 +*) cmd="$1"
8 + shift
9 + test -x $path/git-$cmd && exec $path/git-$cmd "$@" ;;
10 +esac
11 +
12 +echo "Usage: git COMMAND [OPTIONS] [TARGET]"
13 +if [ -n "$cmd" ]; then
14 + echo " git command '$cmd' not found: commands are:"
15 +else
16 + echo " git commands are:"
17 +fi
18 +
19 +cat <<\EOF
20 + add apply archimport bisect branch checkout cherry clone
21 + commit count-objects cvsimport diff fetch format-patch
22 + fsck-cache get-tar-commit-id init-db log ls-remote octopus
23 + pack-objects parse-remote patch-id prune pull push rebase
24 + relink rename repack request-pull reset resolve revert
25 + send-email shortlog show-branch status tag verify-tag
26 + whatchanged
27 +EOF
http-fetch.c renamed
+2 -2
@@ -1,7 +1,7 @@
1 #include "cache.h"
2 #include "commit.h"
3
4 -#include "pull.h"
4 +#include "fetch.h"
5
6 #include <curl/curl.h>
7 #include <curl/easy.h>
@@ -345,7 +345,7 @@ int main(int argc, char **argv)
345 arg++;
346 }
347 if (argc < arg + 2) {
348 - usage("git-http-pull [-c] [-t] [-a] [-d] [-v] [--recover] [-w ref] commit-id url");
348 + usage("git-http-fetch [-c] [-t] [-a] [-d] [-v] [--recover] [-w ref] commit-id url");
349 return 1;
350 }
351 commit_id = argv[arg];
local-fetch.c renamed
+2 -2
@@ -3,7 +3,7 @@
3 */
4 #include "cache.h"
5 #include "commit.h"
6 -#include "pull.h"
6 +#include "fetch.h"
7
8 static int use_link = 0;
9 static int use_symlink = 0;
@@ -178,7 +178,7 @@ int fetch_ref(char *ref, unsigned char *sha1)
178 }
179
180 static const char local_pull_usage[] =
181 -"git-local-pull [-c] [-t] [-a] [-d] [-v] [-w filename] [--recover] [-l] [-s] [-n] commit-id path";
181 +"git-local-fetch [-c] [-t] [-a] [-d] [-v] [-w filename] [--recover] [-l] [-s] [-n] commit-id path";
182
183 /*
184 * By default we only use file copy.
merge-index.c renamed
+4 -4
@@ -42,7 +42,7 @@ static int merge_entry(int pos, const char *path)
42 int found;
43
44 if (pos >= active_nr)
45 - die("git-merge-cache: %s not in the cache", path);
45 + die("git-merge-index: %s not in the cache", path);
46 arguments[0] = pgm;
47 arguments[1] = "";
48 arguments[2] = "";
@@ -67,7 +67,7 @@ static int merge_entry(int pos, const char *path)
67 arguments[stage + 4] = ownbuf[stage];
68 } while (++pos < active_nr);
69 if (!found)
70 - die("git-merge-cache: %s not in the cache", path);
70 + die("git-merge-index: %s not in the cache", path);
71 run_program();
72 return found;
73 }
@@ -100,7 +100,7 @@ int main(int argc, char **argv)
100 int i, force_file = 0;
101
102 if (argc < 3)
103 - usage("git-merge-cache [-o] [-q] <merge-program> (-a | <filename>*)");
103 + usage("git-merge-index [-o] [-q] <merge-program> (-a | <filename>*)");
104
105 read_cache();
106
@@ -125,7 +125,7 @@ int main(int argc, char **argv)
125 merge_all();
126 continue;
127 }
128 - die("git-merge-cache: unknown option %s", arg);
128 + die("git-merge-index: unknown option %s", arg);
129 }
130 merge_file(arg);
131 }
ssh-fetch.c renamed
+3 -3
@@ -1,7 +1,7 @@
1 #include "cache.h"
2 #include "commit.h"
3 #include "rsh.h"
4 -#include "pull.h"
4 +#include "fetch.h"
5 #include "refs.h"
6
7 static int fd_in;
@@ -90,7 +90,7 @@ int main(int argc, char **argv)
90 const char *prog;
91
92 prog = getenv("GIT_SSH_PUSH");
93 - if (!prog) prog = "git-ssh-push";
93 + if (!prog) prog = "git-ssh-upload";
94
95 while (arg < argc && argv[arg][0] == '-') {
96 if (argv[arg][1] == 't') {
@@ -110,7 +110,7 @@ int main(int argc, char **argv)
110 arg++;
111 }
112 if (argc < arg + 2) {
113 - usage("git-ssh-pull [-c] [-t] [-a] [-v] [-d] [--recover] [-w ref] commit-id url");
113 + usage("git-ssh-fetch [-c] [-t] [-a] [-v] [-d] [--recover] [-w ref] commit-id url");
114 return 1;
115 }
116 commit_id = argv[arg];
ssh-upload.c renamed
+5 -5
@@ -17,7 +17,7 @@ static int serve_object(int fd_in, int fd_out) {
17 do {
18 size = read(fd_in, sha1 + posn, 20 - posn);
19 if (size < 0) {
20 - perror("git-ssh-push: read ");
20 + perror("git-ssh-upload: read ");
21 return -1;
22 }
23 if (!size)
@@ -31,7 +31,7 @@ static int serve_object(int fd_in, int fd_out) {
31 remote = 0;
32
33 if (!has_sha1_file(sha1)) {
34 - fprintf(stderr, "git-ssh-push: could not find %s\n",
34 + fprintf(stderr, "git-ssh-upload: could not find %s\n",
35 sha1_to_hex(sha1));
36 remote = -1;
37 }
@@ -84,7 +84,7 @@ static void service(int fd_in, int fd_out) {
84 retval = read(fd_in, &type, 1);
85 if (retval < 1) {
86 if (retval < 0)
87 - perror("git-ssh-push: read ");
87 + perror("git-ssh-upload: read ");
88 return;
89 }
90 if (type == 'v' && serve_version(fd_in, fd_out))
@@ -97,7 +97,7 @@ static void service(int fd_in, int fd_out) {
97 }
98
99 static const char ssh_push_usage[] =
100 - "git-ssh-push [-c] [-t] [-a] [-w ref] commit-id url";
100 + "git-ssh-upload [-c] [-t] [-a] [-w ref] commit-id url";
101
102 int main(int argc, char **argv)
103 {
@@ -110,7 +110,7 @@ int main(int argc, char **argv)
110 char hex[41];
111
112 prog = getenv("GIT_SSH_PULL");
113 - if (!prog) prog = "git-ssh-pull";
113 + if (!prog) prog = "git-ssh-fetch";
114 while (arg < argc && argv[arg][0] == '-') {
115 if (argv[arg][1] == 'w')
116 arg++;
t/README
+5 -5
@@ -20,9 +20,9 @@ the tests.
20 *** t0000-basic.sh ***
21 * ok 1: .git/objects should be empty after git-init-db in an empty repo.
22 * ok 2: .git/objects should have 256 subdirectories.
23 - * ok 3: git-update-cache without --add should fail adding.
23 + * ok 3: git-update-index without --add should fail adding.
24 ...
25 - * ok 23: no diff after checkout and git-update-cache --refresh.
25 + * ok 23: no diff after checkout and git-update-index --refresh.
26 * passed all 23 test(s)
27 *** t0100-environment-names.sh ***
28 * ok 1: using old names should issue warnings.
@@ -33,7 +33,7 @@ Or you can run each test individually from command line, like
33 this:
34
35 $ sh ./t3001-ls-files-killed.sh
36 - * ok 1: git-update-cache --add to add various paths.
36 + * ok 1: git-update-index --add to add various paths.
37 * ok 2: git-ls-files -k to show killed files.
38 * ok 3: validate git-ls-files -k output.
39 * passed all 3 test(s)
@@ -163,8 +163,8 @@ library for your script to use.
163 Example:
164
165 test_expect_failure \
166 - 'git-update-cache without --add should fail adding.' \
167 - 'git-update-cache should-be-empty'
166 + 'git-update-index without --add should fail adding.' \
167 + 'git-update-index should-be-empty'
168
169 - test_debug <script>
170
t/lib-read-tree-m-3way.sh
+22 -22
@@ -10,14 +10,14 @@ do
10 echo This is Z/$p from the original tree. >Z/$p
11 test_expect_success \
12 "adding test file $p and Z/$p" \
13 - 'git-update-cache --add $p &&
14 - git-update-cache --add Z/$p'
13 + 'git-update-index --add $p &&
14 + git-update-index --add Z/$p'
15 done
16 done
17 echo This is SS from the original tree. >SS
18 test_expect_success \
19 'adding test file SS' \
20 - 'git-update-cache --add SS'
20 + 'git-update-index --add SS'
21 cat >TT <<\EOF
22 This is a trivial merge sample text.
23 Branch A is expected to upcase this word, here.
@@ -32,7 +32,7 @@ This concludes the trivial merge sample file.
32 EOF
33 test_expect_success \
34 'adding test file TT' \
35 - 'git-update-cache --add TT'
35 + 'git-update-index --add TT'
36 test_expect_success \
37 'prepare initial tree' \
38 'tree_O=$(git-write-tree)'
@@ -47,14 +47,14 @@ to_remove=$(echo D? Z/D?)
47 rm -f $to_remove
48 test_expect_success \
49 'change in branch A (removal)' \
50 - 'git-update-cache --remove $to_remove'
50 + 'git-update-index --remove $to_remove'
51
52 for p in M? Z/M?
53 do
54 echo This is modified $p in the branch A. >$p
55 test_expect_success \
56 'change in branch A (modification)' \
57 - "git-update-cache $p"
57 + "git-update-index $p"
58 done
59
60 for p in AN AA Z/AN Z/AA
@@ -62,27 +62,27 @@ do
62 echo This is added $p in the branch A. >$p
63 test_expect_success \
64 'change in branch A (addition)' \
65 - "git-update-cache --add $p"
65 + "git-update-index --add $p"
66 done
67
68 echo This is SS from the modified tree. >SS
69 echo This is LL from the modified tree. >LL
70 test_expect_success \
71 'change in branch A (addition)' \
72 - 'git-update-cache --add LL &&
73 - git-update-cache SS'
72 + 'git-update-index --add LL &&
73 + git-update-index SS'
74 mv TT TT-
75 sed -e '/Branch A/s/word/WORD/g' <TT- >TT
76 rm -f TT-
77 test_expect_success \
78 'change in branch A (edit)' \
79 - 'git-update-cache TT'
79 + 'git-update-index TT'
80
81 mkdir DF
82 echo Branch A makes a file at DF/DF, creating a directory DF. >DF/DF
83 test_expect_success \
84 'change in branch A (change file to directory)' \
85 - 'git-update-cache --add DF/DF'
85 + 'git-update-index --add DF/DF'
86
87 test_expect_success \
88 'recording branch A tree' \
@@ -97,20 +97,20 @@ mkdir Z
97 test_expect_success \
98 'reading original tree and checking out' \
99 'git-read-tree $tree_O &&
100 - git-checkout-cache -a'
100 + git-checkout-index -a'
101
102 to_remove=$(echo ?D Z/?D)
103 rm -f $to_remove
104 test_expect_success \
105 'change in branch B (removal)' \
106 - "git-update-cache --remove $to_remove"
106 + "git-update-index --remove $to_remove"
107
108 for p in ?M Z/?M
109 do
110 echo This is modified $p in the branch B. >$p
111 test_expect_success \
112 'change in branch B (modification)' \
113 - "git-update-cache $p"
113 + "git-update-index $p"
114 done
115
116 for p in NA AA Z/NA Z/AA
@@ -118,25 +118,25 @@ do
118 echo This is added $p in the branch B. >$p
119 test_expect_success \
120 'change in branch B (addition)' \
121 - "git-update-cache --add $p"
121 + "git-update-index --add $p"
122 done
123 echo This is SS from the modified tree. >SS
124 echo This is LL from the modified tree. >LL
125 test_expect_success \
126 'change in branch B (addition and modification)' \
127 - 'git-update-cache --add LL &&
128 - git-update-cache SS'
127 + 'git-update-index --add LL &&
128 + git-update-index SS'
129 mv TT TT-
130 sed -e '/Branch B/s/word/WORD/g' <TT- >TT
131 rm -f TT-
132 test_expect_success \
133 'change in branch B (modification)' \
134 - 'git-update-cache TT'
134 + 'git-update-index TT'
135
136 echo Branch B makes a file at DF. >DF
137 test_expect_success \
138 'change in branch B (addition of a file to conflict with directory)' \
139 - 'git-update-cache --add DF'
139 + 'git-update-index --add DF'
140
141 test_expect_success \
142 'recording branch B tree' \
@@ -147,12 +147,12 @@ test_expect_success \
147 'rm -f .git/index &&
148 git-read-tree $tree_O &&
149 mkdir .orig-O &&
150 - git-checkout-cache --prefix=.orig-O/ -f -q -a &&
150 + git-checkout-index --prefix=.orig-O/ -f -q -a &&
151 rm -f .git/index &&
152 git-read-tree $tree_A &&
153 mkdir .orig-A &&
154 - git-checkout-cache --prefix=.orig-A/ -f -q -a &&
154 + git-checkout-index --prefix=.orig-A/ -f -q -a &&
155 rm -f .git/index &&
156 git-read-tree $tree_B &&
157 mkdir .orig-B &&
158 - git-checkout-cache --prefix=.orig-B/ -f -q -a'
158 + git-checkout-index --prefix=.orig-B/ -f -q -a'
t/t0000-basic.sh
+13 -13
@@ -40,13 +40,13 @@ test_expect_success \
40
41 # updating a new file without --add should fail.
42 test_expect_failure \
43 - 'git-update-cache without --add should fail adding.' \
44 - 'git-update-cache should-be-empty'
43 + 'git-update-index without --add should fail adding.' \
44 + 'git-update-index should-be-empty'
45
46 # and with --add it should succeed, even if it is empty (it used to fail).
47 test_expect_success \
48 - 'git-update-cache with --add should succeed.' \
49 - 'git-update-cache --add should-be-empty'
48 + 'git-update-index with --add should succeed.' \
49 + 'git-update-index --add should-be-empty'
50
51 test_expect_success \
52 'writing tree out with git-write-tree' \
@@ -60,12 +60,12 @@ test_expect_success \
60 # Removing paths.
61 rm -f should-be-empty full-of-directories
62 test_expect_failure \
63 - 'git-update-cache without --remove should fail removing.' \
64 - 'git-update-cache should-be-empty'
63 + 'git-update-index without --remove should fail removing.' \
64 + 'git-update-index should-be-empty'
65
66 test_expect_success \
67 - 'git-update-cache with --remove should be able to remove.' \
68 - 'git-update-cache --remove should-be-empty'
67 + 'git-update-index with --remove should be able to remove.' \
68 + 'git-update-index --remove should-be-empty'
69
70 # Empty tree can be written with recent write-tree.
71 test_expect_success \
@@ -84,8 +84,8 @@ do
84 ln -s "hello $p" ${p}sym
85 done
86 test_expect_success \
87 - 'adding various types of objects with git-update-cache --add.' \
88 - 'find path* ! -type d -print0 | xargs -0 git-update-cache --add'
87 + 'adding various types of objects with git-update-index --add.' \
88 + 'find path* ! -type d -print0 | xargs -0 git-update-index --add'
89
90 # Show them and see that matches what we expect.
91 test_expect_success \
@@ -170,11 +170,11 @@ test_expect_success \
170 'git-diff-files >current && diff >/dev/null -b current expected'
171
172 test_expect_success \
173 - 'git-update-cache --refresh should succeed.' \
174 - 'git-update-cache --refresh'
173 + 'git-update-index --refresh should succeed.' \
174 + 'git-update-index --refresh'
175
176 test_expect_success \
177 - 'no diff after checkout and git-update-cache --refresh.' \
177 + 'no diff after checkout and git-update-index --refresh.' \
178 'git-diff-files >current && cmp -s current /dev/null'
179
180 test_done
t/t0100-environment-names.sh
+1 -1
@@ -34,7 +34,7 @@ export_them () {
34 }
35
36 date >path0
37 -git-update-cache --add path0
37 +git-update-index --add path0
38 tree=$(git-write-tree)
39
40 AUTHOR_DATE='Wed May 11 23:55:18 2005'
t/t0110-environment-names-old.sh
+2 -2
@@ -54,8 +54,8 @@ test_expect_success \
54
55 date >path0
56 test_expect_success \
57 - 'using GIT_DIR in git-update-cache' \
58 - 'git-update-cache --add path0 && test -f .svn/index'
57 + 'using GIT_DIR in git-update-index' \
58 + 'git-update-index --add path0 && test -f .svn/index'
59
60 sedScript='s|\(..\)|.svn/objects/\1/|'
61
t/t1000-read-tree-m-3way.sh
+37 -37
@@ -150,7 +150,7 @@ test_expect_success \
150 "rm -fr [NDMALTS][NDMALTSF] Z &&
151 rm .git/index &&
152 git-read-tree $tree_A &&
153 - git-checkout-cache -f -u -a &&
153 + git-checkout-index -f -u -a &&
154 git-read-tree -m $tree_O $tree_A $tree_B &&
155 check_result"
156
@@ -230,21 +230,21 @@ test_expect_failure \
230 '1 - must not have an entry not in A.' \
231 "rm -f .git/index XX &&
232 echo XX >XX &&
233 - git-update-cache --add XX &&
233 + git-update-index --add XX &&
234 git-read-tree -m $tree_O $tree_A $tree_B"
235
236 test_expect_success \
237 '2 - must match B in !O && !A && B case.' \
238 "rm -f .git/index NA &&
239 cp .orig-B/NA NA &&
240 - git-update-cache --add NA &&
240 + git-update-index --add NA &&
241 git-read-tree -m $tree_O $tree_A $tree_B"
242
243 test_expect_success \
244 '2 - matching B alone is OK in !O && !A && B case.' \
245 "rm -f .git/index NA &&
246 cp .orig-B/NA NA &&
247 - git-update-cache --add NA &&
247 + git-update-index --add NA &&
248 echo extra >>NA &&
249 git-read-tree -m $tree_O $tree_A $tree_B"
250
@@ -252,7 +252,7 @@ test_expect_success \
252 '3 - must match A in !O && A && !B case.' \
253 "rm -f .git/index AN &&
254 cp .orig-A/AN AN &&
255 - git-update-cache --add AN &&
255 + git-update-index --add AN &&
256 git-read-tree -m $tree_O $tree_A $tree_B &&
257 check_result"
258
@@ -260,7 +260,7 @@ test_expect_success \
260 '3 - matching A alone is OK in !O && A && !B case.' \
261 "rm -f .git/index AN &&
262 cp .orig-A/AN AN &&
263 - git-update-cache --add AN &&
263 + git-update-index --add AN &&
264 echo extra >>AN &&
265 git-read-tree -m $tree_O $tree_A $tree_B"
266
@@ -269,14 +269,14 @@ test_expect_failure \
269 "rm -f .git/index AN &&
270 cp .orig-A/AN AN &&
271 echo extra >>AN &&
272 - git-update-cache --add AN &&
272 + git-update-index --add AN &&
273 git-read-tree -m $tree_O $tree_A $tree_B"
274
275 test_expect_success \
276 '4 - must match and be up-to-date in !O && A && B && A!=B case.' \
277 "rm -f .git/index AA &&
278 cp .orig-A/AA AA &&
279 - git-update-cache --add AA &&
279 + git-update-index --add AA &&
280 git-read-tree -m $tree_O $tree_A $tree_B &&
281 check_result"
282
@@ -284,7 +284,7 @@ test_expect_failure \
284 '4 (fail) - must match and be up-to-date in !O && A && B && A!=B case.' \
285 "rm -f .git/index AA &&
286 cp .orig-A/AA AA &&
287 - git-update-cache --add AA &&
287 + git-update-index --add AA &&
288 echo extra >>AA &&
289 git-read-tree -m $tree_O $tree_A $tree_B"
290
@@ -293,14 +293,14 @@ test_expect_failure \
293 "rm -f .git/index AA &&
294 cp .orig-A/AA AA &&
295 echo extra >>AA &&
296 - git-update-cache --add AA &&
296 + git-update-index --add AA &&
297 git-read-tree -m $tree_O $tree_A $tree_B"
298
299 test_expect_success \
300 '5 - must match in !O && A && B && A==B case.' \
301 "rm -f .git/index LL &&
302 cp .orig-A/LL LL &&
303 - git-update-cache --add LL &&
303 + git-update-index --add LL &&
304 git-read-tree -m $tree_O $tree_A $tree_B &&
305 check_result"
306
@@ -308,7 +308,7 @@ test_expect_success \
308 '5 - must match in !O && A && B && A==B case.' \
309 "rm -f .git/index LL &&
310 cp .orig-A/LL LL &&
311 - git-update-cache --add LL &&
311 + git-update-index --add LL &&
312 echo extra >>LL &&
313 git-read-tree -m $tree_O $tree_A $tree_B &&
314 check_result"
@@ -318,35 +318,35 @@ test_expect_failure \
318 "rm -f .git/index LL &&
319 cp .orig-A/LL LL &&
320 echo extra >>LL &&
321 - git-update-cache --add LL &&
321 + git-update-index --add LL &&
322 git-read-tree -m $tree_O $tree_A $tree_B"
323
324 test_expect_failure \
325 '6 - must not exist in O && !A && !B case' \
326 "rm -f .git/index DD &&
327 echo DD >DD
328 - git-update-cache --add DD &&
328 + git-update-index --add DD &&
329 git-read-tree -m $tree_O $tree_A $tree_B"
330
331 test_expect_failure \
332 '7 - must not exist in O && !A && B && O!=B case' \
333 "rm -f .git/index DM &&
334 cp .orig-B/DM DM &&
335 - git-update-cache --add DM &&
335 + git-update-index --add DM &&
336 git-read-tree -m $tree_O $tree_A $tree_B"
337
338 test_expect_failure \
339 '8 - must not exist in O && !A && B && O==B case' \
340 "rm -f .git/index DN &&
341 cp .orig-B/DN DN &&
342 - git-update-cache --add DN &&
342 + git-update-index --add DN &&
343 git-read-tree -m $tree_O $tree_A $tree_B"
344
345 test_expect_success \
346 '9 - must match and be up-to-date in O && A && !B && O!=A case' \
347 "rm -f .git/index MD &&
348 cp .orig-A/MD MD &&
349 - git-update-cache --add MD &&
349 + git-update-index --add MD &&
350 git-read-tree -m $tree_O $tree_A $tree_B &&
351 check_result"
352
@@ -354,7 +354,7 @@ test_expect_failure \
354 '9 (fail) - must match and be up-to-date in O && A && !B && O!=A case' \
355 "rm -f .git/index MD &&
356 cp .orig-A/MD MD &&
357 - git-update-cache --add MD &&
357 + git-update-index --add MD &&
358 echo extra >>MD &&
359 git-read-tree -m $tree_O $tree_A $tree_B"
360
@@ -363,14 +363,14 @@ test_expect_failure \
363 "rm -f .git/index MD &&
364 cp .orig-A/MD MD &&
365 echo extra >>MD &&
366 - git-update-cache --add MD &&
366 + git-update-index --add MD &&
367 git-read-tree -m $tree_O $tree_A $tree_B"
368
369 test_expect_success \
370 '10 - must match and be up-to-date in O && A && !B && O==A case' \
371 "rm -f .git/index ND &&
372 cp .orig-A/ND ND &&
373 - git-update-cache --add ND &&
373 + git-update-index --add ND &&
374 git-read-tree -m $tree_O $tree_A $tree_B &&
375 check_result"
376
@@ -378,7 +378,7 @@ test_expect_failure \
378 '10 (fail) - must match and be up-to-date in O && A && !B && O==A case' \
379 "rm -f .git/index ND &&
380 cp .orig-A/ND ND &&
381 - git-update-cache --add ND &&
381 + git-update-index --add ND &&
382 echo extra >>ND &&
383 git-read-tree -m $tree_O $tree_A $tree_B"
384
@@ -387,14 +387,14 @@ test_expect_failure \
387 "rm -f .git/index ND &&
388 cp .orig-A/ND ND &&
389 echo extra >>ND &&
390 - git-update-cache --add ND &&
390 + git-update-index --add ND &&
391 git-read-tree -m $tree_O $tree_A $tree_B"
392
393 test_expect_success \
394 '11 - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case' \
395 "rm -f .git/index MM &&
396 cp .orig-A/MM MM &&
397 - git-update-cache --add MM &&
397 + git-update-index --add MM &&
398 git-read-tree -m $tree_O $tree_A $tree_B &&
399 check_result"
400
@@ -402,7 +402,7 @@ test_expect_failure \
402 '11 (fail) - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case' \
403 "rm -f .git/index MM &&
404 cp .orig-A/MM MM &&
405 - git-update-cache --add MM &&
405 + git-update-index --add MM &&
406 echo extra >>MM &&
407 git-read-tree -m $tree_O $tree_A $tree_B"
408
@@ -411,14 +411,14 @@ test_expect_failure \
411 "rm -f .git/index MM &&
412 cp .orig-A/MM MM &&
413 echo extra >>MM &&
414 - git-update-cache --add MM &&
414 + git-update-index --add MM &&
415 git-read-tree -m $tree_O $tree_A $tree_B"
416
417 test_expect_success \
418 '12 - must match A in O && A && B && O!=A && A==B case' \
419 "rm -f .git/index SS &&
420 cp .orig-A/SS SS &&
421 - git-update-cache --add SS &&
421 + git-update-index --add SS &&
422 git-read-tree -m $tree_O $tree_A $tree_B &&
423 check_result"
424
@@ -426,7 +426,7 @@ test_expect_success \
426 '12 - must match A in O && A && B && O!=A && A==B case' \
427 "rm -f .git/index SS &&
428 cp .orig-A/SS SS &&
429 - git-update-cache --add SS &&
429 + git-update-index --add SS &&
430 echo extra >>SS &&
431 git-read-tree -m $tree_O $tree_A $tree_B &&
432 check_result"
@@ -436,14 +436,14 @@ test_expect_failure \
436 "rm -f .git/index SS &&
437 cp .orig-A/SS SS &&
438 echo extra >>SS &&
439 - git-update-cache --add SS &&
439 + git-update-index --add SS &&
440 git-read-tree -m $tree_O $tree_A $tree_B"
441
442 test_expect_success \
443 '13 - must match A in O && A && B && O!=A && O==B case' \
444 "rm -f .git/index MN &&
445 cp .orig-A/MN MN &&
446 - git-update-cache --add MN &&
446 + git-update-index --add MN &&
447 git-read-tree -m $tree_O $tree_A $tree_B &&
448 check_result"
449
@@ -451,7 +451,7 @@ test_expect_success \
451 '13 - must match A in O && A && B && O!=A && O==B case' \
452 "rm -f .git/index MN &&
453 cp .orig-A/MN MN &&
454 - git-update-cache --add MN &&
454 + git-update-index --add MN &&
455 echo extra >>MN &&
456 git-read-tree -m $tree_O $tree_A $tree_B &&
457 check_result"
@@ -460,7 +460,7 @@ test_expect_success \
460 '14 - must match and be up-to-date in O && A && B && O==A && O!=B case' \
461 "rm -f .git/index NM &&
462 cp .orig-A/NM NM &&
463 - git-update-cache --add NM &&
463 + git-update-index --add NM &&
464 git-read-tree -m $tree_O $tree_A $tree_B &&
465 check_result"
466
@@ -468,7 +468,7 @@ test_expect_success \
468 '14 - may match B in O && A && B && O==A && O!=B case' \
469 "rm -f .git/index NM &&
470 cp .orig-B/NM NM &&
471 - git-update-cache --add NM &&
471 + git-update-index --add NM &&
472 echo extra >>NM &&
473 git-read-tree -m $tree_O $tree_A $tree_B &&
474 check_result"
@@ -477,7 +477,7 @@ test_expect_failure \
477 '14 (fail) - must match and be up-to-date in O && A && B && O==A && O!=B case' \
478 "rm -f .git/index NM &&
479 cp .orig-A/NM NM &&
480 - git-update-cache --add NM &&
480 + git-update-index --add NM &&
481 echo extra >>NM &&
482 git-read-tree -m $tree_O $tree_A $tree_B"
483
@@ -486,14 +486,14 @@ test_expect_failure \
486 "rm -f .git/index NM &&
487 cp .orig-A/NM NM &&
488 echo extra >>NM &&
489 - git-update-cache --add NM &&
489 + git-update-index --add NM &&
490 git-read-tree -m $tree_O $tree_A $tree_B"
491
492 test_expect_success \
493 '15 - must match A in O && A && B && O==A && O==B case' \
494 "rm -f .git/index NN &&
495 cp .orig-A/NN NN &&
496 - git-update-cache --add NN &&
496 + git-update-index --add NN &&
497 git-read-tree -m $tree_O $tree_A $tree_B &&
498 check_result"
499
@@ -501,7 +501,7 @@ test_expect_success \
501 '15 - must match A in O && A && B && O==A && O==B case' \
502 "rm -f .git/index NN &&
503 cp .orig-A/NN NN &&
504 - git-update-cache --add NN &&
504 + git-update-index --add NN &&
505 echo extra >>NN &&
506 git-read-tree -m $tree_O $tree_A $tree_B &&
507 check_result"
@@ -511,7 +511,7 @@ test_expect_failure \
511 "rm -f .git/index NN &&
512 cp .orig-A/NN NN &&
513 echo extra >>NN &&
514 - git-update-cache --add NN &&
514 + git-update-index --add NN &&
515 git-read-tree -m $tree_O $tree_A $tree_B"
516
517 test_done
t/t1001-read-tree-m-2way.sh
+43 -43
@@ -68,13 +68,13 @@ test_expect_success \
68 cat bozbar-old >bozbar &&
69 echo rezrov >rezrov &&
70 echo yomin >yomin &&
71 - git-update-cache --add nitfol bozbar rezrov &&
71 + git-update-index --add nitfol bozbar rezrov &&
72 treeH=`git-write-tree` &&
73 echo treeH $treeH &&
74 git-ls-tree $treeH &&
75
76 cat bozbar-new >bozbar &&
77 - git-update-cache --add frotz bozbar --force-remove rezrov &&
77 + git-update-index --add frotz bozbar --force-remove rezrov &&
78 git-ls-files --stage >M.out &&
79 treeM=`git-write-tree` &&
80 echo treeM $treeM &&
@@ -97,8 +97,8 @@ test_expect_success \
97 '4 - carry forward local addition.' \
98 'rm -f .git/index &&
99 git-read-tree $treeH &&
100 - git-checkout-cache -u -f -q -a &&
101 - git-update-cache --add yomin &&
100 + git-checkout-index -u -f -q -a &&
101 + git-update-index --add yomin &&
102 read_tree_twoway $treeH $treeM &&
103 git-ls-files --stage >4.out || return 1
104 diff -u M.out 4.out >4diff.out
@@ -109,9 +109,9 @@ test_expect_success \
109 '5 - carry forward local addition.' \
110 'rm -f .git/index &&
111 git-read-tree $treeH &&
112 - git-checkout-cache -u -f -q -a &&
112 + git-checkout-index -u -f -q -a &&
113 echo yomin >yomin &&
114 - git-update-cache --add yomin &&
114 + git-update-index --add yomin &&
115 echo yomin yomin >yomin &&
116 read_tree_twoway $treeH $treeM &&
117 git-ls-files --stage >5.out || return 1
@@ -123,8 +123,8 @@ test_expect_success \
123 '6 - local addition already has the same.' \
124 'rm -f .git/index &&
125 git-read-tree $treeH &&
126 - git-checkout-cache -u -f -q -a &&
127 - git-update-cache --add frotz &&
126 + git-checkout-index -u -f -q -a &&
127 + git-update-index --add frotz &&
128 read_tree_twoway $treeH $treeM &&
129 git-ls-files --stage >6.out &&
130 diff -u M.out 6.out &&
@@ -134,9 +134,9 @@ test_expect_success \
134 '7 - local addition already has the same.' \
135 'rm -f .git/index &&
136 git-read-tree $treeH &&
137 - git-checkout-cache -u -f -q -a &&
137 + git-checkout-index -u -f -q -a &&
138 echo frotz >frotz &&
139 - git-update-cache --add frotz &&
139 + git-update-index --add frotz &&
140 echo frotz frotz >frotz &&
141 read_tree_twoway $treeH $treeM &&
142 git-ls-files --stage >7.out &&
@@ -147,18 +147,18 @@ test_expect_success \
147 '8 - conflicting addition.' \
148 'rm -f .git/index &&
149 git-read-tree $treeH &&
150 - git-checkout-cache -u -f -q -a &&
150 + git-checkout-index -u -f -q -a &&
151 echo frotz frotz >frotz &&
152 - git-update-cache --add frotz &&
152 + git-update-index --add frotz &&
153 if read_tree_twoway $treeH $treeM; then false; else :; fi'
154
155 test_expect_success \
156 '9 - conflicting addition.' \
157 'rm -f .git/index &&
158 git-read-tree $treeH &&
159 - git-checkout-cache -u -f -q -a &&
159 + git-checkout-index -u -f -q -a &&
160 echo frotz frotz >frotz &&
161 - git-update-cache --add frotz &&
161 + git-update-index --add frotz &&
162 echo frotz >frotz &&
163 if read_tree_twoway $treeH $treeM; then false; else :; fi'
164
@@ -166,9 +166,9 @@ test_expect_success \
166 '10 - path removed.' \
167 'rm -f .git/index &&
168 git-read-tree $treeH &&
169 - git-checkout-cache -u -f -q -a &&
169 + git-checkout-index -u -f -q -a &&
170 echo rezrov >rezrov &&
171 - git-update-cache --add rezrov &&
171 + git-update-index --add rezrov &&
172 read_tree_twoway $treeH $treeM &&
173 git-ls-files --stage >10.out &&
174 diff -u M.out 10.out'
@@ -177,9 +177,9 @@ test_expect_success \
177 '11 - dirty path removed.' \
178 'rm -f .git/index &&
179 git-read-tree $treeH &&
180 - git-checkout-cache -u -f -q -a &&
180 + git-checkout-index -u -f -q -a &&
181 echo rezrov >rezrov &&
182 - git-update-cache --add rezrov &&
182 + git-update-index --add rezrov &&
183 echo rezrov rezrov >rezrov &&
184 if read_tree_twoway $treeH $treeM; then false; else :; fi'
185
@@ -187,18 +187,18 @@ test_expect_success \
187 '12 - unmatching local changes being removed.' \
188 'rm -f .git/index &&
189 git-read-tree $treeH &&
190 - git-checkout-cache -u -f -q -a &&
190 + git-checkout-index -u -f -q -a &&
191 echo rezrov rezrov >rezrov &&
192 - git-update-cache --add rezrov &&
192 + git-update-index --add rezrov &&
193 if read_tree_twoway $treeH $treeM; then false; else :; fi'
194
195 test_expect_success \
196 '13 - unmatching local changes being removed.' \
197 'rm -f .git/index &&
198 git-read-tree $treeH &&
199 - git-checkout-cache -u -f -q -a &&
199 + git-checkout-index -u -f -q -a &&
200 echo rezrov rezrov >rezrov &&
201 - git-update-cache --add rezrov &&
201 + git-update-index --add rezrov &&
202 echo rezrov >rezrov &&
203 if read_tree_twoway $treeH $treeM; then false; else :; fi'
204
@@ -211,9 +211,9 @@ test_expect_success \
211 '14 - unchanged in two heads.' \
212 'rm -f .git/index &&
213 git-read-tree $treeH &&
214 - git-checkout-cache -u -f -q -a &&
214 + git-checkout-index -u -f -q -a &&
215 echo nitfol nitfol >nitfol &&
216 - git-update-cache --add nitfol &&
216 + git-update-index --add nitfol &&
217 read_tree_twoway $treeH $treeM &&
218 git-ls-files --stage >14.out || return 1
219 diff -u M.out 14.out >14diff.out
@@ -224,9 +224,9 @@ test_expect_success \
224 '15 - unchanged in two heads.' \
225 'rm -f .git/index &&
226 git-read-tree $treeH &&
227 - git-checkout-cache -u -f -q -a &&
227 + git-checkout-index -u -f -q -a &&
228 echo nitfol nitfol >nitfol &&
229 - git-update-cache --add nitfol &&
229 + git-update-index --add nitfol &&
230 echo nitfol nitfol nitfol >nitfol &&
231 read_tree_twoway $treeH $treeM &&
232 git-ls-files --stage >15.out || return 1
@@ -238,18 +238,18 @@ test_expect_success \
238 '16 - conflicting local change.' \
239 'rm -f .git/index &&
240 git-read-tree $treeH &&
241 - git-checkout-cache -u -f -q -a &&
241 + git-checkout-index -u -f -q -a &&
242 echo bozbar bozbar >bozbar &&
243 - git-update-cache --add bozbar &&
243 + git-update-index --add bozbar &&
244 if read_tree_twoway $treeH $treeM; then false; else :; fi'
245
246 test_expect_success \
247 '17 - conflicting local change.' \
248 'rm -f .git/index &&
249 git-read-tree $treeH &&
250 - git-checkout-cache -u -f -q -a &&
250 + git-checkout-index -u -f -q -a &&
251 echo bozbar bozbar >bozbar &&
252 - git-update-cache --add bozbar &&
252 + git-update-index --add bozbar &&
253 echo bozbar bozbar bozbar >bozbar &&
254 if read_tree_twoway $treeH $treeM; then false; else :; fi'
255
@@ -257,9 +257,9 @@ test_expect_success \
257 '18 - local change already having a good result.' \
258 'rm -f .git/index &&
259 git-read-tree $treeH &&
260 - git-checkout-cache -u -f -q -a &&
260 + git-checkout-index -u -f -q -a &&
261 cat bozbar-new >bozbar &&
262 - git-update-cache --add bozbar &&
262 + git-update-index --add bozbar &&
263 read_tree_twoway $treeH $treeM &&
264 git-ls-files --stage >18.out &&
265 diff -u M.out 18.out &&
@@ -269,9 +269,9 @@ test_expect_success \
269 '19 - local change already having a good result, further modified.' \
270 'rm -f .git/index &&
271 git-read-tree $treeH &&
272 - git-checkout-cache -u -f -q -a &&
272 + git-checkout-index -u -f -q -a &&
273 cat bozbar-new >bozbar &&
274 - git-update-cache --add bozbar &&
274 + git-update-index --add bozbar &&
275 echo gnusto gnusto >bozbar &&
276 read_tree_twoway $treeH $treeM &&
277 git-ls-files --stage >19.out &&
@@ -282,9 +282,9 @@ test_expect_success \
282 '20 - no local change, use new tree.' \
283 'rm -f .git/index &&
284 git-read-tree $treeH &&
285 - git-checkout-cache -u -f -q -a &&
285 + git-checkout-index -u -f -q -a &&
286 cat bozbar-old >bozbar &&
287 - git-update-cache --add bozbar &&
287 + git-update-index --add bozbar &&
288 read_tree_twoway $treeH $treeM &&
289 git-ls-files --stage >20.out &&
290 diff -u M.out 20.out &&
@@ -294,9 +294,9 @@ test_expect_success \
294 '21 - no local change, dirty cache.' \
295 'rm -f .git/index &&
296 git-read-tree $treeH &&
297 - git-checkout-cache -u -f -q -a &&
297 + git-checkout-index -u -f -q -a &&
298 cat bozbar-old >bozbar &&
299 - git-update-cache --add bozbar &&
299 + git-update-index --add bozbar &&
300 echo gnusto gnusto >bozbar &&
301 if read_tree_twoway $treeH $treeM; then false; else :; fi'
302
@@ -305,9 +305,9 @@ test_expect_success \
305 '22 - local change cache updated.' \
306 'rm -f .git/index &&
307 git-read-tree $treeH &&
308 - git-checkout-cache -u -f -q -a &&
308 + git-checkout-index -u -f -q -a &&
309 sed -e "s/such as/SUCH AS/" bozbar-old >bozbar &&
310 - git-update-cache --add bozbar &&
310 + git-update-index --add bozbar &&
311 if read_tree_twoway $treeH $treeM; then false; else :; fi'
312
313 # Also make sure we did not break DF vs DF/DF case.
@@ -315,7 +315,7 @@ test_expect_success \
315 'DF vs DF/DF case setup.' \
316 'rm -f .git/index &&
317 echo DF >DF &&
318 - git-update-cache --add DF &&
318 + git-update-index --add DF &&
319 treeDF=`git-write-tree` &&
320 echo treeDF $treeDF &&
321 git-ls-tree $treeDF &&
@@ -323,7 +323,7 @@ test_expect_success \
323 rm -f DF &&
324 mkdir DF &&
325 echo DF/DF >DF/DF &&
326 - git-update-cache --add --remove DF DF/DF &&
326 + git-update-index --add --remove DF DF/DF &&
327 treeDFDF=`git-write-tree` &&
328 echo treeDFDF $treeDFDF &&
329 git-ls-tree $treeDFDF &&
@@ -334,7 +334,7 @@ test_expect_success \
334 'rm -f .git/index &&
335 rm -fr DF &&
336 echo DF >DF &&
337 - git-update-cache --add DF &&
337 + git-update-index --add DF &&
338 read_tree_twoway $treeDF $treeDFDF &&
339 git-ls-files --stage >DFDFcheck.out &&
340 diff -u DFDF.out DFDFcheck.out &&
t/t1002-read-tree-m-u-2way.sh
+23 -23
@@ -40,13 +40,13 @@ test_expect_success \
40 echo bozbar >bozbar &&
41 echo rezrov >rezrov &&
42 echo yomin >yomin &&
43 - git-update-cache --add nitfol bozbar rezrov &&
43 + git-update-index --add nitfol bozbar rezrov &&
44 treeH=`git-write-tree` &&
45 echo treeH $treeH &&
46 git-ls-tree $treeH &&
47
48 echo gnusto >bozbar &&
49 - git-update-cache --add frotz bozbar --force-remove rezrov &&
49 + git-update-index --add frotz bozbar --force-remove rezrov &&
50 git-ls-files --stage >M.out &&
51 treeM=`git-write-tree` &&
52 echo treeM $treeM &&
@@ -71,7 +71,7 @@ echo '+100644 X 0 yomin' >expected
71 test_expect_success \
72 '4 - carry forward local addition.' \
73 'rm -f .git/index &&
74 - git-update-cache --add yomin &&
74 + git-update-index --add yomin &&
75 git-read-tree -m -u $treeH $treeM &&
76 git-ls-files --stage >4.out || return 1
77 diff --unified=0 M.out 4.out >4diff.out
@@ -87,7 +87,7 @@ test_expect_success \
87 '5 - carry forward local addition.' \
88 'rm -f .git/index &&
89 echo yomin >yomin &&
90 - git-update-cache --add yomin &&
90 + git-update-index --add yomin &&
91 echo yomin yomin >yomin &&
92 git-read-tree -m -u $treeH $treeM &&
93 git-ls-files --stage >5.out || return 1
@@ -104,7 +104,7 @@ test_expect_success \
104 test_expect_success \
105 '6 - local addition already has the same.' \
106 'rm -f .git/index &&
107 - git-update-cache --add frotz &&
107 + git-update-index --add frotz &&
108 git-read-tree -m -u $treeH $treeM &&
109 git-ls-files --stage >6.out &&
110 diff --unified=0 M.out 6.out &&
@@ -119,7 +119,7 @@ test_expect_success \
119 '7 - local addition already has the same.' \
120 'rm -f .git/index &&
121 echo frotz >frotz &&
122 - git-update-cache --add frotz &&
122 + git-update-index --add frotz &&
123 echo frotz frotz >frotz &&
124 git-read-tree -m -u $treeH $treeM &&
125 git-ls-files --stage >7.out &&
@@ -136,14 +136,14 @@ test_expect_success \
136 '8 - conflicting addition.' \
137 'rm -f .git/index &&
138 echo frotz frotz >frotz &&
139 - git-update-cache --add frotz &&
139 + git-update-index --add frotz &&
140 if git-read-tree -m -u $treeH $treeM; then false; else :; fi'
141
142 test_expect_success \
143 '9 - conflicting addition.' \
144 'rm -f .git/index &&
145 echo frotz frotz >frotz &&
146 - git-update-cache --add frotz &&
146 + git-update-index --add frotz &&
147 echo frotz >frotz &&
148 if git-read-tree -m -u $treeH $treeM; then false; else :; fi'
149
@@ -151,7 +151,7 @@ test_expect_success \
151 '10 - path removed.' \
152 'rm -f .git/index &&
153 echo rezrov >rezrov &&
154 - git-update-cache --add rezrov &&
154 + git-update-index --add rezrov &&
155 git-read-tree -m -u $treeH $treeM &&
156 git-ls-files --stage >10.out &&
157 cmp M.out 10.out &&
@@ -162,7 +162,7 @@ test_expect_success \
162 '11 - dirty path removed.' \
163 'rm -f .git/index &&
164 echo rezrov >rezrov &&
165 - git-update-cache --add rezrov &&
165 + git-update-index --add rezrov &&
166 echo rezrov rezrov >rezrov &&
167 if git-read-tree -m -u $treeH $treeM; then false; else :; fi'
168
@@ -170,14 +170,14 @@ test_expect_success \
170 '12 - unmatching local changes being removed.' \
171 'rm -f .git/index &&
172 echo rezrov rezrov >rezrov &&
173 - git-update-cache --add rezrov &&
173 + git-update-index --add rezrov &&
174 if git-read-tree -m -u $treeH $treeM; then false; else :; fi'
175
176 test_expect_success \
177 '13 - unmatching local changes being removed.' \
178 'rm -f .git/index &&
179 echo rezrov rezrov >rezrov &&
180 - git-update-cache --add rezrov &&
180 + git-update-index --add rezrov &&
181 echo rezrov >rezrov &&
182 if git-read-tree -m -u $treeH $treeM; then false; else :; fi'
183
@@ -190,7 +190,7 @@ test_expect_success \
190 '14 - unchanged in two heads.' \
191 'rm -f .git/index &&
192 echo nitfol nitfol >nitfol &&
193 - git-update-cache --add nitfol &&
193 + git-update-index --add nitfol &&
194 git-read-tree -m -u $treeH $treeM &&
195 git-ls-files --stage >14.out || return 1
196 diff --unified=0 M.out 14.out >14diff.out
@@ -209,7 +209,7 @@ test_expect_success \
209 '15 - unchanged in two heads.' \
210 'rm -f .git/index &&
211 echo nitfol nitfol >nitfol &&
212 - git-update-cache --add nitfol &&
212 + git-update-index --add nitfol &&
213 echo nitfol nitfol nitfol >nitfol &&
214 git-read-tree -m -u $treeH $treeM &&
215 git-ls-files --stage >15.out || return 1
@@ -229,14 +229,14 @@ test_expect_success \
229 '16 - conflicting local change.' \
230 'rm -f .git/index &&
231 echo bozbar bozbar >bozbar &&
232 - git-update-cache --add bozbar &&
232 + git-update-index --add bozbar &&
233 if git-read-tree -m -u $treeH $treeM; then false; else :; fi'
234
235 test_expect_success \
236 '17 - conflicting local change.' \
237 'rm -f .git/index &&
238 echo bozbar bozbar >bozbar &&
239 - git-update-cache --add bozbar &&
239 + git-update-index --add bozbar &&
240 echo bozbar bozbar bozbar >bozbar &&
241 if git-read-tree -m -u $treeH $treeM; then false; else :; fi'
242
@@ -244,7 +244,7 @@ test_expect_success \
244 '18 - local change already having a good result.' \
245 'rm -f .git/index &&
246 echo gnusto >bozbar &&
247 - git-update-cache --add bozbar &&
247 + git-update-index --add bozbar &&
248 git-read-tree -m -u $treeH $treeM &&
249 git-ls-files --stage >18.out &&
250 diff --unified=0 M.out 18.out &&
@@ -256,7 +256,7 @@ test_expect_success \
256 '19 - local change already having a good result, further modified.' \
257 'rm -f .git/index &&
258 echo gnusto >bozbar &&
259 - git-update-cache --add bozbar &&
259 + git-update-index --add bozbar &&
260 echo gnusto gnusto >bozbar &&
261 git-read-tree -m -u $treeH $treeM &&
262 git-ls-files --stage >19.out &&
@@ -275,7 +275,7 @@ test_expect_success \
275 '20 - no local change, use new tree.' \
276 'rm -f .git/index &&
277 echo bozbar >bozbar &&
278 - git-update-cache --add bozbar &&
278 + git-update-index --add bozbar &&
279 git-read-tree -m -u $treeH $treeM &&
280 git-ls-files --stage >20.out &&
281 diff --unified=0 M.out 20.out &&
@@ -287,7 +287,7 @@ test_expect_success \
287 '21 - no local change, dirty cache.' \
288 'rm -f .git/index &&
289 echo bozbar >bozbar &&
290 - git-update-cache --add bozbar &&
290 + git-update-index --add bozbar &&
291 echo gnusto gnusto >bozbar &&
292 if git-read-tree -m -u $treeH $treeM; then false; else :; fi'
293
@@ -296,7 +296,7 @@ test_expect_success \
296 'DF vs DF/DF case setup.' \
297 'rm -f .git/index &&
298 echo DF >DF &&
299 - git-update-cache --add DF &&
299 + git-update-index --add DF &&
300 treeDF=`git-write-tree` &&
301 echo treeDF $treeDF &&
302 git-ls-tree $treeDF &&
@@ -304,7 +304,7 @@ test_expect_success \
304 rm -f DF &&
305 mkdir DF &&
306 echo DF/DF >DF/DF &&
307 - git-update-cache --add --remove DF DF/DF &&
307 + git-update-index --add --remove DF DF/DF &&
308 treeDFDF=`git-write-tree` &&
309 echo treeDFDF $treeDFDF &&
310 git-ls-tree $treeDFDF &&
@@ -315,7 +315,7 @@ test_expect_success \
315 'rm -f .git/index &&
316 rm -fr DF &&
317 echo DF >DF &&
318 - git-update-cache --add DF &&
318 + git-update-index --add DF &&
319 git-read-tree -m -u $treeDF $treeDFDF &&
320 git-ls-files --stage >DFDFcheck.out &&
321 diff --unified=0 DFDF.out DFDFcheck.out &&
t/t1005-read-tree-m-2way-emu23.sh
+46 -46
@@ -25,7 +25,7 @@ In the test, these paths are used:
25 read_tree_twoway () {
26 git-read-tree --emu23 "$1" "$2" &&
27 git-ls-files --stage &&
28 - git-merge-cache git-merge-one-file-script -a &&
28 + git-merge-index ../../git-merge-one-file.sh -a &&
29 git-ls-files --stage
30 }
31
@@ -77,13 +77,13 @@ test_expect_success \
77 cat bozbar-old >bozbar &&
78 echo rezrov >rezrov &&
79 echo yomin >yomin &&
80 - git-update-cache --add nitfol bozbar rezrov &&
80 + git-update-index --add nitfol bozbar rezrov &&
81 treeH=`git-write-tree` &&
82 echo treeH $treeH &&
83 git-ls-tree $treeH &&
84
85 cat bozbar-new >bozbar &&
86 - git-update-cache --add frotz bozbar --force-remove rezrov &&
86 + git-update-index --add frotz bozbar --force-remove rezrov &&
87 git-ls-files --stage >M.out &&
88 treeM=`git-write-tree` &&
89 echo treeM $treeM &&
@@ -117,8 +117,8 @@ test_expect_success \
117 '4 - carry forward local addition.' \
118 'rm -f .git/index &&
119 git-read-tree $treeH &&
120 - git-checkout-cache -u -f -q -a &&
121 - git-update-cache --add yomin &&
120 + git-checkout-index -u -f -q -a &&
121 + git-update-index --add yomin &&
122 read_tree_twoway $treeH $treeM &&
123 git-ls-files --stage >4.out || return 1
124 diff -u M.out 4.out >4diff.out
@@ -131,9 +131,9 @@ test_expect_success \
131 '5 - carry forward local addition.' \
132 'rm -f .git/index &&
133 git-read-tree $treeH &&
134 - git-checkout-cache -u -f -q -a &&
134 + git-checkout-index -u -f -q -a &&
135 echo yomin >yomin &&
136 - git-update-cache --add yomin &&
136 + git-update-index --add yomin &&
137 echo yomin yomin >yomin &&
138 read_tree_twoway $treeH $treeM &&
139 git-ls-files --stage >5.out || return 1
@@ -147,8 +147,8 @@ test_expect_success \
147 '6 - local addition already has the same.' \
148 'rm -f .git/index &&
149 git-read-tree $treeH &&
150 - git-checkout-cache -u -f -q -a &&
151 - git-update-cache --add frotz &&
150 + git-checkout-index -u -f -q -a &&
151 + git-update-index --add frotz &&
152 read_tree_twoway $treeH $treeM &&
153 git-ls-files --stage >6.out &&
154 diff -u M.out 6.out &&
@@ -160,9 +160,9 @@ test_expect_success \
160 '7 - local addition already has the same.' \
161 'rm -f .git/index &&
162 git-read-tree $treeH &&
163 - git-checkout-cache -u -f -q -a &&
163 + git-checkout-index -u -f -q -a &&
164 echo frotz >frotz &&
165 - git-update-cache --add frotz &&
165 + git-update-index --add frotz &&
166 echo frotz frotz >frotz &&
167 read_tree_twoway $treeH $treeM &&
168 git-ls-files --stage >7.out &&
@@ -173,18 +173,18 @@ test_expect_success \
173 '8 - conflicting addition.' \
174 'rm -f .git/index &&
175 git-read-tree $treeH &&
176 - git-checkout-cache -u -f -q -a &&
176 + git-checkout-index -u -f -q -a &&
177 echo frotz frotz >frotz &&
178 - git-update-cache --add frotz &&
178 + git-update-index --add frotz &&
179 if read_tree_twoway $treeH $treeM; then false; else :; fi'
180
181 test_expect_success \
182 '9 - conflicting addition.' \
183 'rm -f .git/index &&
184 git-read-tree $treeH &&
185 - git-checkout-cache -u -f -q -a &&
185 + git-checkout-index -u -f -q -a &&
186 echo frotz frotz >frotz &&
187 - git-update-cache --add frotz &&
187 + git-update-index --add frotz &&
188 echo frotz >frotz &&
189 if read_tree_twoway $treeH $treeM; then false; else :; fi'
190
@@ -192,9 +192,9 @@ test_expect_success \
192 '10 - path removed.' \
193 'rm -f .git/index &&
194 git-read-tree $treeH &&
195 - git-checkout-cache -u -f -q -a &&
195 + git-checkout-index -u -f -q -a &&
196 echo rezrov >rezrov &&
197 - git-update-cache --add rezrov &&
197 + git-update-index --add rezrov &&
198 read_tree_twoway $treeH $treeM &&
199 git-ls-files --stage >10.out &&
200 diff -u M.out 10.out'
@@ -203,9 +203,9 @@ test_expect_success \
203 '11 - dirty path removed.' \
204 'rm -f .git/index &&
205 git-read-tree $treeH &&
206 - git-checkout-cache -u -f -q -a &&
206 + git-checkout-index -u -f -q -a &&
207 echo rezrov >rezrov &&
208 - git-update-cache --add rezrov &&
208 + git-update-index --add rezrov &&
209 echo rezrov rezrov >rezrov &&
210 if read_tree_twoway $treeH $treeM; then false; else :; fi'
211
@@ -213,18 +213,18 @@ test_expect_success \
213 '12 - unmatching local changes being removed.' \
214 'rm -f .git/index &&
215 git-read-tree $treeH &&
216 - git-checkout-cache -u -f -q -a &&
216 + git-checkout-index -u -f -q -a &&
217 echo rezrov rezrov >rezrov &&
218 - git-update-cache --add rezrov &&
218 + git-update-index --add rezrov &&
219 if read_tree_twoway $treeH $treeM; then false; else :; fi'
220
221 test_expect_success \
222 '13 - unmatching local changes being removed.' \
223 'rm -f .git/index &&
224 git-read-tree $treeH &&
225 - git-checkout-cache -u -f -q -a &&
225 + git-checkout-index -u -f -q -a &&
226 echo rezrov rezrov >rezrov &&
227 - git-update-cache --add rezrov &&
227 + git-update-index --add rezrov &&
228 echo rezrov >rezrov &&
229 if read_tree_twoway $treeH $treeM; then false; else :; fi'
230
@@ -237,9 +237,9 @@ test_expect_success \
237 '14 - unchanged in two heads.' \
238 'rm -f .git/index &&
239 git-read-tree $treeH &&
240 - git-checkout-cache -u -f -q -a &&
240 + git-checkout-index -u -f -q -a &&
241 echo nitfol nitfol >nitfol &&
242 - git-update-cache --add nitfol &&
242 + git-update-index --add nitfol &&
243 read_tree_twoway $treeH $treeM &&
244 git-ls-files --stage >14.out || return 1
245 diff -u M.out 14.out >14diff.out
@@ -250,9 +250,9 @@ test_expect_success \
250 '15 - unchanged in two heads.' \
251 'rm -f .git/index &&
252 git-read-tree $treeH &&
253 - git-checkout-cache -u -f -q -a &&
253 + git-checkout-index -u -f -q -a &&
254 echo nitfol nitfol >nitfol &&
255 - git-update-cache --add nitfol &&
255 + git-update-index --add nitfol &&
256 echo nitfol nitfol nitfol >nitfol &&
257 read_tree_twoway $treeH $treeM &&
258 git-ls-files --stage >15.out || return 1
@@ -268,9 +268,9 @@ test_expect_success \
268 '16 - conflicting local change.' \
269 'rm -f .git/index &&
270 git-read-tree $treeH &&
271 - git-checkout-cache -u -f -q -a &&
271 + git-checkout-index -u -f -q -a &&
272 echo bozbar bozbar >bozbar &&
273 - git-update-cache --add bozbar &&
273 + git-update-index --add bozbar &&
274 git-read-tree --emu23 $treeH $treeM &&
275 check_stages' <<\EOF
276 100644 X 1 bozbar
@@ -286,9 +286,9 @@ test_expect_success \
286 '17 - conflicting local change.' \
287 'rm -f .git/index &&
288 git-read-tree $treeH &&
289 - git-checkout-cache -u -f -q -a &&
289 + git-checkout-index -u -f -q -a &&
290 echo bozbar bozbar >bozbar &&
291 - git-update-cache --add bozbar &&
291 + git-update-index --add bozbar &&
292 echo bozbar bozbar bozbar >bozbar &&
293 if read_tree_twoway $treeH $treeM; then false; else :; fi'
294
@@ -296,9 +296,9 @@ test_expect_success \
296 '18 - local change already having a good result.' \
297 'rm -f .git/index &&
298 git-read-tree $treeH &&
299 - git-checkout-cache -u -f -q -a &&
299 + git-checkout-index -u -f -q -a &&
300 cat bozbar-new >bozbar &&
301 - git-update-cache --add bozbar &&
301 + git-update-index --add bozbar &&
302 read_tree_twoway $treeH $treeM &&
303 git-ls-files --stage >18.out &&
304 diff -u M.out 18.out &&
@@ -308,9 +308,9 @@ test_expect_success \
308 '19 - local change already having a good result, further modified.' \
309 'rm -f .git/index &&
310 git-read-tree $treeH &&
311 - git-checkout-cache -u -f -q -a &&
311 + git-checkout-index -u -f -q -a &&
312 cat bozbar-new >bozbar &&
313 - git-update-cache --add bozbar &&
313 + git-update-index --add bozbar &&
314 echo gnusto gnusto >bozbar &&
315 read_tree_twoway $treeH $treeM &&
316 git-ls-files --stage >19.out &&
@@ -321,9 +321,9 @@ test_expect_success \
321 '20 - no local change, use new tree.' \
322 'rm -f .git/index &&
323 git-read-tree $treeH &&
324 - git-checkout-cache -u -f -q -a &&
324 + git-checkout-index -u -f -q -a &&
325 cat bozbar-old >bozbar &&
326 - git-update-cache --add bozbar &&
326 + git-update-index --add bozbar &&
327 read_tree_twoway $treeH $treeM &&
328 git-ls-files --stage >20.out &&
329 diff -u M.out 20.out &&
@@ -333,9 +333,9 @@ test_expect_success \
333 '21 - no local change, dirty cache.' \
334 'rm -f .git/index &&
335 git-read-tree $treeH &&
336 - git-checkout-cache -u -f -q -a &&
336 + git-checkout-index -u -f -q -a &&
337 cat bozbar-old >bozbar &&
338 - git-update-cache --add bozbar &&
338 + git-update-index --add bozbar &&
339 echo gnusto gnusto >bozbar &&
340 if read_tree_twoway $treeH $treeM; then false; else :; fi'
341
@@ -348,9 +348,9 @@ test_expect_success \
348 '22 - local change cache updated.' \
349 'rm -f .git/index &&
350 git-read-tree $treeH &&
351 - git-checkout-cache -u -f -q -a &&
351 + git-checkout-index -u -f -q -a &&
352 sed -e "s/such as/SUCH AS/" bozbar-old >bozbar &&
353 - git-update-cache --add bozbar &&
353 + git-update-index --add bozbar &&
354 read_tree_twoway $treeH $treeM &&
355 git-ls-files --stage >22.out || return 1
356 diff -u M.out 22.out >22diff.out
@@ -362,7 +362,7 @@ test_expect_success \
362 'DF vs DF/DF case setup.' \
363 'rm -f .git/index &&
364 echo DF >DF &&
365 - git-update-cache --add DF &&
365 + git-update-index --add DF &&
366 treeDF=`git-write-tree` &&
367 echo treeDF $treeDF &&
368 git-ls-tree $treeDF &&
@@ -371,7 +371,7 @@ test_expect_success \
371 rm -f DF &&
372 mkdir DF &&
373 echo DF/DF >DF/DF &&
374 - git-update-cache --add --remove DF DF/DF &&
374 + git-update-index --add --remove DF DF/DF &&
375 treeDFDF=`git-write-tree` &&
376 echo treeDFDF $treeDFDF &&
377 git-ls-tree $treeDFDF &&
@@ -382,7 +382,7 @@ test_expect_success \
382 'rm -f .git/index &&
383 rm -fr DF &&
384 echo DF >DF &&
385 - git-update-cache --add DF &&
385 + git-update-index --add DF &&
386 read_tree_twoway $treeDF $treeDFDF &&
387 git-ls-files --stage >DFDFcheck.out &&
388 diff -u DFDF.out DFDFcheck.out &&
@@ -396,7 +396,7 @@ test_expect_success \
396 rm -fr DF &&
397 mkdir DF &&
398 echo DF/DF >DF/DF &&
399 - git-update-cache --add DF/DF &&
399 + git-update-index --add DF/DF &&
400 read_tree_twoway $treeDFDF $treeDF &&
401 git-ls-files --stage >DFDFcheck.out &&
402 diff -u DF.out DFDFcheck.out &&
@@ -411,7 +411,7 @@ test_expect_success \
411 rm -fr DF &&
412 mkdir DF &&
413 echo DF/DF >DF/DF &&
414 - git-update-cache --add DF/DF &&
414 + git-update-index --add DF/DF &&
415 # This should fail because I and H have a conflict
416 # at DF.
417 if git-read-tree --emu23 $treeDF $treeDFDF
t/t2000-checkout-cache-clash.sh
+9 -9
@@ -3,7 +3,7 @@
3 # Copyright (c) 2005 Junio C Hamano
4 #
5
6 -test_description='git-checkout-cache test.
6 +test_description='git-checkout-index test.
7
8 This test registers the following filesystem structure in the
9 cache:
@@ -16,7 +16,7 @@ And then tries to checkout in a work tree that has the following:
16 path0/file0 - a file in a directory
17 path1 - a file
18
19 -The git-checkout-cache command should fail when attempting to checkout
19 +The git-checkout-index command should fail when attempting to checkout
20 path0, finding it is occupied by a directory, and path1/file1, finding
21 path1 is occupied by a non-directory. With "-f" flag, it should remove
22 the conflicting paths and succeed.
@@ -28,8 +28,8 @@ mkdir path1
28 date >path1/file1
29
30 test_expect_success \
31 - 'git-update-cache --add various paths.' \
32 - 'git-update-cache --add path0 path1/file1'
31 + 'git-update-index --add various paths.' \
32 + 'git-update-index --add path0 path1/file1'
33
34 rm -fr path0 path1
35 mkdir path0
@@ -37,15 +37,15 @@ date >path0/file0
37 date >path1
38
39 test_expect_failure \
40 - 'git-checkout-cache without -f should fail on conflicting work tree.' \
41 - 'git-checkout-cache -a'
40 + 'git-checkout-index without -f should fail on conflicting work tree.' \
41 + 'git-checkout-index -a'
42
43 test_expect_success \
44 - 'git-checkout-cache with -f should succeed.' \
45 - 'git-checkout-cache -f -a'
44 + 'git-checkout-index with -f should succeed.' \
45 + 'git-checkout-index -f -a'
46
47 test_expect_success \
48 - 'git-checkout-cache conflicting paths.' \
48 + 'git-checkout-index conflicting paths.' \
49 'test -f path0 && test -d path1 && test -f path1/file1'
50
51 test_done
t/t2001-checkout-cache-clash.sh
+9 -9
@@ -3,7 +3,7 @@
3 # Copyright (c) 2005 Junio C Hamano
4 #
5
6 -test_description='git-checkout-cache test.
6 +test_description='git-checkout-index test.
7
8 This test registers the following filesystem structure in the cache:
9
@@ -36,8 +36,8 @@ show_files() {
36 mkdir path0
37 date >path0/file0
38 test_expect_success \
39 - 'git-update-cache --add path0/file0' \
40 - 'git-update-cache --add path0/file0'
39 + 'git-update-index --add path0/file0' \
40 + 'git-update-index --add path0/file0'
41 test_expect_success \
42 'writing tree out with git-write-tree' \
43 'tree1=$(git-write-tree)'
@@ -46,8 +46,8 @@ test_debug 'show_files $tree1'
46 mkdir path1
47 date >path1/file1
48 test_expect_success \
49 - 'git-update-cache --add path1/file1' \
50 - 'git-update-cache --add path1/file1'
49 + 'git-update-index --add path1/file1' \
50 + 'git-update-index --add path1/file1'
51 test_expect_success \
52 'writing tree out with git-write-tree' \
53 'tree2=$(git-write-tree)'
@@ -56,13 +56,13 @@ test_debug 'show_files $tree2'
56 rm -fr path1
57 test_expect_success \
58 'read previously written tree and checkout.' \
59 - 'git-read-tree -m $tree1 && git-checkout-cache -f -a'
59 + 'git-read-tree -m $tree1 && git-checkout-index -f -a'
60 test_debug 'show_files $tree1'
61
62 ln -s path0 path1
63 test_expect_success \
64 - 'git-update-cache --add a symlink.' \
65 - 'git-update-cache --add path1'
64 + 'git-update-index --add a symlink.' \
65 + 'git-update-index --add path1'
66 test_expect_success \
67 'writing tree out with git-write-tree' \
68 'tree3=$(git-write-tree)'
@@ -73,7 +73,7 @@ test_debug 'show_files $tree3'
73
74 test_expect_success \
75 'read previously written tree and checkout.' \
76 - 'git-read-tree $tree2 && git-checkout-cache -f -a'
76 + 'git-read-tree $tree2 && git-checkout-index -f -a'
77 test_debug show_files $tree2
78
79 test_expect_success \
t/t2002-checkout-cache-u.sh
+8 -8
@@ -3,31 +3,31 @@
3 # Copyright (c) 2005 Junio C Hamano
4 #
5
6 -test_description='git-checkout-cache -u test.
6 +test_description='git-checkout-index -u test.
7
8 -With -u flag, git-checkout-cache internally runs the equivalent of
9 -git-update-cache --refresh on the checked out entry.'
8 +With -u flag, git-checkout-index internally runs the equivalent of
9 +git-update-index --refresh on the checked out entry.'
10
11 . ./test-lib.sh
12
13 test_expect_success \
14 'preparation' '
15 echo frotz >path0 &&
16 -git-update-cache --add path0 &&
16 +git-update-index --add path0 &&
17 t=$(git-write-tree)'
18
19 test_expect_failure \
20 -'without -u, git-checkout-cache smudges stat information.' '
20 +'without -u, git-checkout-index smudges stat information.' '
21 rm -f path0 &&
22 git-read-tree $t &&
23 -git-checkout-cache -f -a &&
23 +git-checkout-index -f -a &&
24 git-diff-files | diff - /dev/null'
25
26 test_expect_success \
27 -'with -u, git-checkout-cache picks up stat information from new files.' '
27 +'with -u, git-checkout-index picks up stat information from new files.' '
28 rm -f path0 &&
29 git-read-tree $t &&
30 -git-checkout-cache -u -f -a &&
30 +git-checkout-index -u -f -a &&
31 git-diff-files | diff - /dev/null'
32
33 test_done
t/t2003-checkout-cache-mkdir.sh
+9 -9
@@ -3,7 +3,7 @@
3 # Copyright (c) 2005 Junio C Hamano
4 #
5
6 -test_description='git-checkout-cache --prefix test.
6 +test_description='git-checkout-index --prefix test.
7
8 This test makes sure that --prefix option works as advertised, and
9 also verifies that such leading path may contain symlinks, unlike
@@ -17,14 +17,14 @@ test_expect_success \
17 'mkdir path1 &&
18 echo frotz >path0 &&
19 echo rezrov >path1/file1 &&
20 - git-update-cache --add path0 path1/file1'
20 + git-update-index --add path0 path1/file1'
21
22 test_expect_success \
23 'have symlink in place where dir is expected.' \
24 'rm -fr path0 path1 &&
25 mkdir path2 &&
26 ln -s path2 path1 &&
27 - git-checkout-cache -f -a &&
27 + git-checkout-index -f -a &&
28 test ! -h path1 && test -d path1 &&
29 test -f path1/file1 && test ! -f path2/file1'
30
@@ -32,7 +32,7 @@ test_expect_success \
32 'use --prefix=path2/' \
33 'rm -fr path0 path1 path2 &&
34 mkdir path2 &&
35 - git-checkout-cache --prefix=path2/ -f -a &&
35 + git-checkout-index --prefix=path2/ -f -a &&
36 test -f path2/path0 &&
37 test -f path2/path1/file1 &&
38 test ! -f path0 &&
@@ -41,7 +41,7 @@ test_expect_success \
41 test_expect_success \
42 'use --prefix=tmp-' \
43 'rm -fr path0 path1 path2 tmp* &&
44 - git-checkout-cache --prefix=tmp- -f -a &&
44 + git-checkout-index --prefix=tmp- -f -a &&
45 test -f tmp-path0 &&
46 test -f tmp-path1/file1 &&
47 test ! -f path0 &&
@@ -52,7 +52,7 @@ test_expect_success \
52 'rm -fr path0 path1 path2 tmp* &&
53 echo nitfol >tmp-path1 &&
54 mkdir tmp-path0 &&
55 - git-checkout-cache --prefix=tmp- -f -a &&
55 + git-checkout-index --prefix=tmp- -f -a &&
56 test -f tmp-path0 &&
57 test -f tmp-path1/file1 &&
58 test ! -f path0 &&
@@ -64,7 +64,7 @@ test_expect_success \
64 'rm -fr path0 path1 path2 tmp* &&
65 mkdir tmp1 tmp1/orary &&
66 ln -s tmp1 tmp &&
67 - git-checkout-cache --prefix=tmp/orary/ -f -a &&
67 + git-checkout-index --prefix=tmp/orary/ -f -a &&
68 test -d tmp1/orary &&
69 test -f tmp1/orary/path0 &&
70 test -f tmp1/orary/path1/file1 &&
@@ -76,7 +76,7 @@ test_expect_success \
76 'rm -fr path0 path1 path2 tmp* &&
77 mkdir tmp1 &&
78 ln -s tmp1 tmp &&
79 - git-checkout-cache --prefix=tmp/orary- -f -a &&
79 + git-checkout-index --prefix=tmp/orary- -f -a &&
80 test -f tmp1/orary-path0 &&
81 test -f tmp1/orary-path1/file1 &&
82 test -h tmp'
@@ -87,7 +87,7 @@ test_expect_success \
87 'rm -fr path0 path1 path2 tmp* &&
88 mkdir tmp1 &&
89 ln -s tmp1 tmp-path1 &&
90 - git-checkout-cache --prefix=tmp- -f -a &&
90 + git-checkout-index --prefix=tmp- -f -a &&
91 test -f tmp-path0 &&
92 test ! -h tmp-path1 &&
93 test -d tmp-path1 &&
t/t2100-update-cache-badpath.sh
+6 -6
@@ -3,7 +3,7 @@
3 # Copyright (c) 2005 Junio C Hamano
4 #
5
6 -test_description='git-update-cache nonsense-path test.
6 +test_description='git-update-index nonsense-path test.
7
8 This test creates the following structure in the cache:
9
@@ -12,7 +12,7 @@ This test creates the following structure in the cache:
12 path2/file2 - a file in a directory
13 path3/file3 - a file in a directory
14
15 -and tries to git-update-cache --add the following:
15 +and tries to git-update-index --add the following:
16
17 path0/file0 - a file in a directory
18 path1/file1 - a file in a directory
@@ -31,8 +31,8 @@ date >path2/file2
31 date >path3/file3
32
33 test_expect_success \
34 - 'git-update-cache --add to add various paths.' \
35 - 'git-update-cache --add -- path0 path1 path2/file2 path3/file3'
34 + 'git-update-index --add to add various paths.' \
35 + 'git-update-index --add -- path0 path1 path2/file2 path3/file3'
36
37 rm -fr path?
38
@@ -45,7 +45,7 @@ date >path1/file1
45 for p in path0/file0 path1/file1 path2 path3
46 do
47 test_expect_failure \
48 - "git-update-cache to add conflicting path $p should fail." \
49 - "git-update-cache --add -- $p"
48 + "git-update-index to add conflicting path $p should fail." \
49 + "git-update-index --add -- $p"
50 done
51 test_done
t/t3010-ls-files-killed.sh
+2 -2
@@ -33,8 +33,8 @@ mkdir path2 path3
33 date >path2/file2
34 date >path3/file3
35 test_expect_success \
36 - 'git-update-cache --add to add various paths.' \
37 - "git-update-cache --add -- path0 path1 path?/file?"
36 + 'git-update-index --add to add various paths.' \
37 + "git-update-index --add -- path0 path1 path?/file?"
38
39 rm -fr path?
40 date >path2
t/t3100-ls-tree-restrict.sh
+1 -1
@@ -27,7 +27,7 @@ test_expect_success \
27 ln -s ../path1 path2/bazbo &&
28 echo Mi >path2/baz/b &&
29 find path? \( -type f -o -type l \) -print |
30 - xargs git-update-cache --add &&
30 + xargs git-update-index --add &&
31 tree=`git-write-tree` &&
32 echo $tree'
33
t/t4000-diff-format.sh
+1 -1
@@ -16,7 +16,7 @@ chmod +x path1
16
17 test_expect_success \
18 'update-cache --add two files with and without +x.' \
19 - 'git-update-cache --add path0 path1'
19 + 'git-update-index --add path0 path1'
20
21 mv path0 path0-
22 sed -e 's/line/Line/' <path0- >path0
t/t4001-diff-rename.sh
+4 -4
@@ -27,7 +27,7 @@ Line 15
27
28 test_expect_success \
29 'update-cache --add a file.' \
30 - 'git-update-cache --add path0'
30 + 'git-update-index --add path0'
31
32 test_expect_success \
33 'write that tree.' \
@@ -37,11 +37,11 @@ sed -e 's/line/Line/' <path0 >path1
37 rm -f path0
38 test_expect_success \
39 'renamed and edited the file.' \
40 - 'git-update-cache --add --remove path0 path1'
40 + 'git-update-index --add --remove path0 path1'
41
42 test_expect_success \
43 - 'git-diff-cache -p -M after rename and editing.' \
44 - 'git-diff-cache -p -M $tree >current'
43 + 'git-diff-index -p -M after rename and editing.' \
44 + 'git-diff-index -p -M $tree >current'
45 cat >expected <<\EOF
46 diff --git a/path0 b/path1
47 rename from path0
t/t4002-diff-basic.sh
+9 -9
@@ -171,28 +171,28 @@ test_expect_success \
171 test_expect_success \
172 'diff-cache O with A in cache' \
173 'git-read-tree $tree_A &&
174 - git-diff-cache --cached $tree_O >.test-a &&
174 + git-diff-index --cached $tree_O >.test-a &&
175 cmp -s .test-a .test-recursive-OA'
176
177 test_expect_success \
178 'diff-cache O with B in cache' \
179 'git-read-tree $tree_B &&
180 - git-diff-cache --cached $tree_O >.test-a &&
180 + git-diff-index --cached $tree_O >.test-a &&
181 cmp -s .test-a .test-recursive-OB'
182
183 test_expect_success \
184 'diff-cache A with B in cache' \
185 'git-read-tree $tree_B &&
186 - git-diff-cache --cached $tree_A >.test-a &&
186 + git-diff-index --cached $tree_A >.test-a &&
187 cmp -s .test-a .test-recursive-AB'
188
189 test_expect_success \
190 'diff-files with O in cache and A checked out' \
191 'rm -fr Z [A-Z][A-Z] &&
192 git-read-tree $tree_A &&
193 - git-checkout-cache -f -a &&
193 + git-checkout-index -f -a &&
194 git-read-tree -m $tree_O || return 1
195 - git-update-cache --refresh >/dev/null ;# this can exit non-zero
195 + git-update-index --refresh >/dev/null ;# this can exit non-zero
196 git-diff-files >.test-a &&
197 cmp_diff_files_output .test-a .test-recursive-OA'
198
@@ -200,9 +200,9 @@ test_expect_success \
200 'diff-files with O in cache and B checked out' \
201 'rm -fr Z [A-Z][A-Z] &&
202 git-read-tree $tree_B &&
203 - git-checkout-cache -f -a &&
203 + git-checkout-index -f -a &&
204 git-read-tree -m $tree_O || return 1
205 - git-update-cache --refresh >/dev/null ;# this can exit non-zero
205 + git-update-index --refresh >/dev/null ;# this can exit non-zero
206 git-diff-files >.test-a &&
207 cmp_diff_files_output .test-a .test-recursive-OB'
208
@@ -210,9 +210,9 @@ test_expect_success \
210 'diff-files with A in cache and B checked out' \
211 'rm -fr Z [A-Z][A-Z] &&
212 git-read-tree $tree_B &&
213 - git-checkout-cache -f -a &&
213 + git-checkout-index -f -a &&
214 git-read-tree -m $tree_A || return 1
215 - git-update-cache --refresh >/dev/null ;# this can exit non-zero
215 + git-update-index --refresh >/dev/null ;# this can exit non-zero
216 git-diff-files >.test-a &&
217 cmp_diff_files_output .test-a .test-recursive-AB'
218
t/t4003-diff-rename-1.sh
+8 -8
@@ -13,7 +13,7 @@ test_expect_success \
13 'prepare reference tree' \
14 'cat ../../COPYING >COPYING &&
15 echo frotz >rezrov &&
16 - git-update-cache --add COPYING rezrov &&
16 + git-update-index --add COPYING rezrov &&
17 tree=$(git-write-tree) &&
18 echo $tree'
19
@@ -22,14 +22,14 @@ test_expect_success \
22 'sed -e 's/HOWEVER/However/' <COPYING >COPYING.1 &&
23 sed -e 's/GPL/G.P.L/g' <COPYING >COPYING.2 &&
24 rm -f COPYING &&
25 - git-update-cache --add --remove COPYING COPYING.?'
25 + git-update-index --add --remove COPYING COPYING.?'
26
27 # tree has COPYING and rezrov. work tree has COPYING.1 and COPYING.2,
28 # both are slightly edited, and unchanged rezrov. So we say you
29 # copy-and-edit one, and rename-and-edit the other. We do not say
30 # anything about rezrov.
31
32 -GIT_DIFF_OPTS=--unified=0 git-diff-cache -M -p $tree >current
32 +GIT_DIFF_OPTS=--unified=0 git-diff-index -M -p $tree >current
33 cat >expected <<\EOF
34 diff --git a/COPYING b/COPYING.1
35 copy from COPYING
@@ -62,14 +62,14 @@ test_expect_success \
62 test_expect_success \
63 'prepare work tree again' \
64 'mv COPYING.2 COPYING &&
65 - git-update-cache --add --remove COPYING COPYING.1 COPYING.2'
65 + git-update-index --add --remove COPYING COPYING.1 COPYING.2'
66
67 # tree has COPYING and rezrov. work tree has COPYING and COPYING.1,
68 # both are slightly edited, and unchanged rezrov. So we say you
69 # edited one, and copy-and-edit the other. We do not say
70 # anything about rezrov.
71
72 -GIT_DIFF_OPTS=--unified=0 git-diff-cache -C -p $tree >current
72 +GIT_DIFF_OPTS=--unified=0 git-diff-index -C -p $tree >current
73 cat >expected <<\EOF
74 diff --git a/COPYING b/COPYING
75 --- a/COPYING
@@ -100,16 +100,16 @@ test_expect_success \
100 test_expect_success \
101 'prepare work tree once again' \
102 'cat ../../COPYING >COPYING &&
103 - git-update-cache --add --remove COPYING COPYING.1'
103 + git-update-index --add --remove COPYING COPYING.1'
104
105 # tree has COPYING and rezrov. work tree has COPYING and COPYING.1,
106 # but COPYING is not edited. We say you copy-and-edit COPYING.1; this
107 # is only possible because -C mode now reports the unmodified file to
108 # the diff-core. Unchanged rezrov, although being fed to
109 -# git-diff-cache as well, should not be mentioned.
109 +# git-diff-index as well, should not be mentioned.
110
111 GIT_DIFF_OPTS=--unified=0 \
112 - git-diff-cache -C --find-copies-harder -p $tree >current
112 + git-diff-index -C --find-copies-harder -p $tree >current
113 cat >expected <<\EOF
114 diff --git a/COPYING b/COPYING.1
115 copy from COPYING
t/t4004-diff-rename-symlink.sh
+3 -3
@@ -15,7 +15,7 @@ test_expect_success \
15 'prepare reference tree' \
16 'echo xyzzy | tr -d '\\\\'012 >yomin &&
17 ln -s xyzzy frotz &&
18 - git-update-cache --add frotz yomin &&
18 + git-update-index --add frotz yomin &&
19 tree=$(git-write-tree) &&
20 echo $tree'
21
@@ -25,7 +25,7 @@ test_expect_success \
25 rm -f yomin &&
26 ln -s xyzzy nitfol &&
27 ln -s xzzzy bozbar &&
28 - git-update-cache --add --remove frotz rezrov nitfol bozbar yomin'
28 + git-update-index --add --remove frotz rezrov nitfol bozbar yomin'
29
30 # tree has frotz pointing at xyzzy, and yomin that contains xyzzy to
31 # confuse things. work tree has rezrov (xyzzy) nitfol (xyzzy) and
@@ -33,7 +33,7 @@ test_expect_success \
33 # rezrov and nitfol are rename/copy of frotz and bozbar should be
34 # a new creation.
35
36 -GIT_DIFF_OPTS=--unified=0 git-diff-cache -M -p $tree >current
36 +GIT_DIFF_OPTS=--unified=0 git-diff-index -M -p $tree >current
37 cat >expected <<\EOF
38 diff --git a/bozbar b/bozbar
39 new file mode 120000
t/t4005-diff-rename-2.sh
+7 -7
@@ -13,7 +13,7 @@ test_expect_success \
13 'prepare reference tree' \
14 'cat ../../COPYING >COPYING &&
15 echo frotz >rezrov &&
16 - git-update-cache --add COPYING rezrov &&
16 + git-update-index --add COPYING rezrov &&
17 tree=$(git-write-tree) &&
18 echo $tree'
19
@@ -22,14 +22,14 @@ test_expect_success \
22 'sed -e 's/HOWEVER/However/' <COPYING >COPYING.1 &&
23 sed -e 's/GPL/G.P.L/g' <COPYING >COPYING.2 &&
24 rm -f COPYING &&
25 - git-update-cache --add --remove COPYING COPYING.?'
25 + git-update-index --add --remove COPYING COPYING.?'
26
27 # tree has COPYING and rezrov. work tree has COPYING.1 and COPYING.2,
28 # both are slightly edited, and unchanged rezrov. We say COPYING.1
29 # and COPYING.2 are based on COPYING, and do not say anything about
30 # rezrov.
31
32 -git-diff-cache -M $tree >current
32 +git-diff-index -M $tree >current
33
34 cat >expected <<\EOF
35 :100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 0603b3238a076dc6c8022aedc6648fa523a17178 C1234 COPYING COPYING.1
@@ -77,14 +77,14 @@ test_expect_success \
77 test_expect_success \
78 'prepare work tree again' \
79 'mv COPYING.2 COPYING &&
80 - git-update-cache --add --remove COPYING COPYING.1 COPYING.2'
80 + git-update-index --add --remove COPYING COPYING.1 COPYING.2'
81
82 # tree has COPYING and rezrov. work tree has COPYING and COPYING.1,
83 # both are slightly edited, and unchanged rezrov. We say COPYING.1
84 # is based on COPYING and COPYING is still there, and do not say anything
85 # about rezrov.
86
87 -git-diff-cache -C $tree >current
87 +git-diff-index -C $tree >current
88 cat >expected <<\EOF
89 :100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 06c67961bbaed34a127f76d261f4c0bf73eda471 M COPYING
90 :100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 0603b3238a076dc6c8022aedc6648fa523a17178 C1234 COPYING COPYING.1
@@ -134,9 +134,9 @@ test_expect_success \
134 test_expect_success \
135 'prepare work tree once again' \
136 'cat ../../COPYING >COPYING &&
137 - git-update-cache --add --remove COPYING COPYING.1'
137 + git-update-index --add --remove COPYING COPYING.1'
138
139 -git-diff-cache -C --find-copies-harder $tree >current
139 +git-diff-index -C --find-copies-harder $tree >current
140 cat >expected <<\EOF
141 :100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 0603b3238a076dc6c8022aedc6648fa523a17178 C1234 COPYING COPYING.1
142 EOF
t/t4006-diff-mode.sh
+3 -3
@@ -11,15 +11,15 @@ test_description='Test mode change diffs.
11 test_expect_success \
12 'setup' \
13 'echo frotz >rezrov &&
14 - git-update-cache --add rezrov &&
14 + git-update-index --add rezrov &&
15 tree=`git-write-tree` &&
16 echo $tree'
17
18 test_expect_success \
19 'chmod' \
20 'chmod +x rezrov &&
21 - git-update-cache rezrov &&
22 - git-diff-cache $tree >current'
21 + git-update-index rezrov &&
22 + git-diff-index $tree >current'
23
24 _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
25 _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
t/t4007-rename-3.sh
+7 -7
@@ -13,20 +13,20 @@ test_expect_success \
13 'prepare reference tree' \
14 'mkdir path0 path1 &&
15 cp ../../COPYING path0/COPYING &&
16 - git-update-cache --add path0/COPYING &&
16 + git-update-index --add path0/COPYING &&
17 tree=$(git-write-tree) &&
18 echo $tree'
19
20 test_expect_success \
21 'prepare work tree' \
22 'cp path0/COPYING path1/COPYING &&
23 - git-update-cache --add --remove path0/COPYING path1/COPYING'
23 + git-update-index --add --remove path0/COPYING path1/COPYING'
24
25 # In the tree, there is only path0/COPYING. In the cache, path0 and
26 # path1 both have COPYING and the latter is a copy of path0/COPYING.
27 # Comparing the full tree with cache should tell us so.
28
29 -git-diff-cache -C --find-copies-harder $tree >current
29 +git-diff-index -C --find-copies-harder $tree >current
30
31 cat >expected <<\EOF
32 :100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 6ff87c4664981e4397625791c8ea3bbb5f2279a3 C100 path0/COPYING path1/COPYING
@@ -42,7 +42,7 @@ test_expect_success \
42 # path1/COPYING suddenly appearing from nowhere, not detected as
43 # a copy from path0/COPYING.
44
45 -git-diff-cache -C $tree path1 >current
45 +git-diff-index -C $tree path1 >current
46
47 cat >expected <<\EOF
48 :000000 100644 0000000000000000000000000000000000000000 6ff87c4664981e4397625791c8ea3bbb5f2279a3 A path1/COPYING
@@ -55,14 +55,14 @@ test_expect_success \
55 test_expect_success \
56 'tweak work tree' \
57 'rm -f path0/COPYING &&
58 - git-update-cache --remove path0/COPYING'
58 + git-update-index --remove path0/COPYING'
59
60 # In the tree, there is only path0/COPYING. In the cache, path0 does
61 # not have COPYING anymore and path1 has COPYING which is a copy of
62 # path0/COPYING. Showing the full tree with cache should tell us about
63 # the rename.
64
65 -git-diff-cache -C $tree >current
65 +git-diff-index -C $tree >current
66
67 cat >expected <<\EOF
68 :100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 6ff87c4664981e4397625791c8ea3bbb5f2279a3 R100 path0/COPYING path1/COPYING
@@ -77,7 +77,7 @@ test_expect_success \
77 # path0/COPYING. When we say we care only about path1, we should just
78 # see path1/COPYING appearing from nowhere.
79
80 -git-diff-cache -C $tree path1 >current
80 +git-diff-index -C $tree path1 >current
81
82 cat >expected <<\EOF
83 :000000 100644 0000000000000000000000000000000000000000 6ff87c4664981e4397625791c8ea3bbb5f2279a3 A path1/COPYING
t/t4008-diff-break-rewrite.sh
+16 -16
@@ -28,7 +28,7 @@ test_expect_success \
28 setup \
29 'cat ../../README >file0 &&
30 cat ../../COPYING >file1 &&
31 - git-update-cache --add file0 file1 &&
31 + git-update-index --add file0 file1 &&
32 tree=$(git-write-tree) &&
33 echo "$tree"'
34
@@ -36,11 +36,11 @@ test_expect_success \
36 'change file1 with copy-edit of file0 and remove file0' \
37 'sed -e "s/git/GIT/" file0 >file1 &&
38 rm -f file0 &&
39 - git-update-cache --remove file0 file1'
39 + git-update-index --remove file0 file1'
40
41 test_expect_success \
42 'run diff with -B' \
43 - 'git-diff-cache -B --cached "$tree" >current'
43 + 'git-diff-index -B --cached "$tree" >current'
44
45 cat >expected <<\EOF
46 :100644 000000 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 0000000000000000000000000000000000000000 D file0
@@ -53,7 +53,7 @@ test_expect_success \
53
54 test_expect_success \
55 'run diff with -B and -M' \
56 - 'git-diff-cache -B -M "$tree" >current'
56 + 'git-diff-index -B -M "$tree" >current'
57
58 cat >expected <<\EOF
59 :100644 100644 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 08bb2fb671deff4c03a4d4a0a1315dff98d5732c R100 file0 file1
@@ -67,15 +67,15 @@ test_expect_success \
67 'swap file0 and file1' \
68 'rm -f file0 file1 &&
69 git-read-tree -m $tree &&
70 - git-checkout-cache -f -u -a &&
70 + git-checkout-index -f -u -a &&
71 mv file0 tmp &&
72 mv file1 file0 &&
73 mv tmp file1 &&
74 - git-update-cache file0 file1'
74 + git-update-index file0 file1'
75
76 test_expect_success \
77 'run diff with -B' \
78 - 'git-diff-cache -B "$tree" >current'
78 + 'git-diff-index -B "$tree" >current'
79
80 cat >expected <<\EOF
81 :100644 100644 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 6ff87c4664981e4397625791c8ea3bbb5f2279a3 M100 file0
@@ -88,7 +88,7 @@ test_expect_success \
88
89 test_expect_success \
90 'run diff with -B and -M' \
91 - 'git-diff-cache -B -M "$tree" >current'
91 + 'git-diff-index -B -M "$tree" >current'
92
93 cat >expected <<\EOF
94 :100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 6ff87c4664981e4397625791c8ea3bbb5f2279a3 R100 file1 file0
@@ -103,11 +103,11 @@ test_expect_success \
103 'make file0 into something completely different' \
104 'rm -f file0 &&
105 ln -s frotz file0 &&
106 - git-update-cache file0 file1'
106 + git-update-index file0 file1'
107
108 test_expect_success \
109 'run diff with -B' \
110 - 'git-diff-cache -B "$tree" >current'
110 + 'git-diff-index -B "$tree" >current'
111
112 cat >expected <<\EOF
113 :100644 120000 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 67be421f88824578857624f7b3dc75e99a8a1481 T file0
@@ -120,7 +120,7 @@ test_expect_success \
120
121 test_expect_success \
122 'run diff with -B' \
123 - 'git-diff-cache -B -M "$tree" >current'
123 + 'git-diff-index -B -M "$tree" >current'
124
125 # This should not mistake file0 as the copy source of new file1
126 # due to type differences.
@@ -135,7 +135,7 @@ test_expect_success \
135
136 test_expect_success \
137 'run diff with -M' \
138 - 'git-diff-cache -M "$tree" >current'
138 + 'git-diff-index -M "$tree" >current'
139
140 # This should not mistake file0 as the copy source of new file1
141 # due to type differences.
@@ -152,15 +152,15 @@ test_expect_success \
152 'file1 edited to look like file0 and file0 rename-edited to file2' \
153 'rm -f file0 file1 &&
154 git-read-tree -m $tree &&
155 - git-checkout-cache -f -u -a &&
155 + git-checkout-index -f -u -a &&
156 sed -e "s/git/GIT/" file0 >file1 &&
157 sed -e "s/git/GET/" file0 >file2 &&
158 rm -f file0
159 - git-update-cache --add --remove file0 file1 file2'
159 + git-update-index --add --remove file0 file1 file2'
160
161 test_expect_success \
162 'run diff with -B' \
163 - 'git-diff-cache -B "$tree" >current'
163 + 'git-diff-index -B "$tree" >current'
164
165 cat >expected <<\EOF
166 :100644 000000 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 0000000000000000000000000000000000000000 D file0
@@ -174,7 +174,7 @@ test_expect_success \
174
175 test_expect_success \
176 'run diff with -B -M' \
177 - 'git-diff-cache -B -M "$tree" >current'
177 + 'git-diff-index -B -M "$tree" >current'
178
179 cat >expected <<\EOF
180 :100644 100644 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 08bb2fb671deff4c03a4d4a0a1315dff98d5732c C095 file0 file1
t/t4009-diff-rename-4.sh
+7 -7
@@ -13,7 +13,7 @@ test_expect_success \
13 'prepare reference tree' \
14 'cat ../../COPYING >COPYING &&
15 echo frotz >rezrov &&
16 - git-update-cache --add COPYING rezrov &&
16 + git-update-index --add COPYING rezrov &&
17 tree=$(git-write-tree) &&
18 echo $tree'
19
@@ -22,14 +22,14 @@ test_expect_success \
22 'sed -e 's/HOWEVER/However/' <COPYING >COPYING.1 &&
23 sed -e 's/GPL/G.P.L/g' <COPYING >COPYING.2 &&
24 rm -f COPYING &&
25 - git-update-cache --add --remove COPYING COPYING.?'
25 + git-update-index --add --remove COPYING COPYING.?'
26
27 # tree has COPYING and rezrov. work tree has COPYING.1 and COPYING.2,
28 # both are slightly edited, and unchanged rezrov. We say COPYING.1
29 # and COPYING.2 are based on COPYING, and do not say anything about
30 # rezrov.
31
32 -git-diff-cache -z -M $tree >current
32 +git-diff-index -z -M $tree >current
33
34 cat >expected <<\EOF
35 :100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 0603b3238a076dc6c8022aedc6648fa523a17178 C1234
@@ -81,14 +81,14 @@ test_expect_success \
81 test_expect_success \
82 'prepare work tree again' \
83 'mv COPYING.2 COPYING &&
84 - git-update-cache --add --remove COPYING COPYING.1 COPYING.2'
84 + git-update-index --add --remove COPYING COPYING.1 COPYING.2'
85
86 # tree has COPYING and rezrov. work tree has COPYING and COPYING.1,
87 # both are slightly edited, and unchanged rezrov. We say COPYING.1
88 # is based on COPYING and COPYING is still there, and do not say anything
89 # about rezrov.
90
91 -git-diff-cache -z -C $tree >current
91 +git-diff-index -z -C $tree >current
92 cat >expected <<\EOF
93 :100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 06c67961bbaed34a127f76d261f4c0bf73eda471 M
94 COPYING
@@ -141,9 +141,9 @@ test_expect_success \
141 test_expect_success \
142 'prepare work tree once again' \
143 'cat ../../COPYING >COPYING &&
144 - git-update-cache --add --remove COPYING COPYING.1'
144 + git-update-index --add --remove COPYING COPYING.1'
145
146 -git-diff-cache -z -C --find-copies-harder $tree >current
146 +git-diff-index -z -C --find-copies-harder $tree >current
147 cat >expected <<\EOF
148 :100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 0603b3238a076dc6c8022aedc6648fa523a17178 C1234
149 COPYING
t/t4010-diff-pathspec.sh
+7 -7
@@ -17,18 +17,18 @@ test_expect_success \
17 'echo frotz >file0 &&
18 mkdir path1 &&
19 echo rezrov >path1/file1 &&
20 - git-update-cache --add file0 path1/file1 &&
20 + git-update-index --add file0 path1/file1 &&
21 tree=`git-write-tree` &&
22 echo "$tree" &&
23 echo nitfol >file0 &&
24 echo yomin >path1/file1 &&
25 - git-update-cache file0 path1/file1'
25 + git-update-index file0 path1/file1'
26
27 cat >expected <<\EOF
28 EOF
29 test_expect_success \
30 'limit to path should show nothing' \
31 - 'git-diff-cache --cached $tree path >current &&
31 + 'git-diff-index --cached $tree path >current &&
32 compare_diff_raw current expected'
33
34 cat >expected <<\EOF
@@ -36,7 +36,7 @@ cat >expected <<\EOF
36 EOF
37 test_expect_success \
38 'limit to path1 should show path1/file1' \
39 - 'git-diff-cache --cached $tree path1 >current &&
39 + 'git-diff-index --cached $tree path1 >current &&
40 compare_diff_raw current expected'
41
42 cat >expected <<\EOF
@@ -44,7 +44,7 @@ cat >expected <<\EOF
44 EOF
45 test_expect_success \
46 'limit to path1/ should show path1/file1' \
47 - 'git-diff-cache --cached $tree path1/ >current &&
47 + 'git-diff-index --cached $tree path1/ >current &&
48 compare_diff_raw current expected'
49
50 cat >expected <<\EOF
@@ -52,14 +52,14 @@ cat >expected <<\EOF
52 EOF
53 test_expect_success \
54 'limit to file0 should show file0' \
55 - 'git-diff-cache --cached $tree file0 >current &&
55 + 'git-diff-index --cached $tree file0 >current &&
56 compare_diff_raw current expected'
57
58 cat >expected <<\EOF
59 EOF
60 test_expect_success \
61 'limit to file0/ should emit nothing.' \
62 - 'git-diff-cache --cached $tree file0/ >current &&
62 + 'git-diff-index --cached $tree file0/ >current &&
63 compare_diff_raw current expected'
64
65 test_done
t/t4102-apply-rename.sh
+1 -1
@@ -26,7 +26,7 @@ echo 'This is foo' >foo
26 chmod +x foo
27
28 test_expect_success setup \
29 - 'git-update-cache --add foo'
29 + 'git-update-index --add foo'
30
31 test_expect_success apply \
32 'git-apply --index --stat --summary --apply test-patch'
t/t4112-apply-renames.sh
+1 -1
@@ -139,7 +139,7 @@ rename to include/arch/m32r/klibc/archsetjmp.h
139 +#endif /* _KLIBC_ARCHSETJMP_H */
140 EOF
141
142 -find include klibc -type f -print | xargs git-update-cache --add --
142 +find include klibc -type f -print | xargs git-update-index --add --
143
144 test_expect_success 'check rename/copy patch' 'git-apply --check patch'
145
t/t5000-tar-tree.sh
+2 -2
@@ -37,8 +37,8 @@ test_expect_success \
37
38 test_expect_success \
39 'add files to repository' \
40 - 'find a -type f | xargs git-update-cache --add &&
41 - find a -type l | xargs git-update-cache --add &&
40 + 'find a -type f | xargs git-update-index --add &&
41 + find a -type l | xargs git-update-index --add &&
42 treeid=`git-write-tree` &&
43 echo $treeid >treeid &&
44 TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
t/t5300-pack-object.sh
+2 -2
@@ -16,9 +16,9 @@ test_expect_success \
16 for i in a b c
17 do
18 dd if=/dev/zero bs=4k count=1 | tr "\\0" $i >$i &&
19 - git-update-cache --add $i || return 1
19 + git-update-index --add $i || return 1
20 done &&
21 - cat c >d && echo foo >>d && git-update-cache --add d &&
21 + cat c >d && echo foo >>d && git-update-index --add d &&
22 tree=`git-write-tree` &&
23 commit=`git-commit-tree $tree </dev/null` && {
24 echo $tree &&
t/t5400-send-pack.sh
+3 -3
@@ -21,9 +21,9 @@ test_expect_success setup '
21 parent=$commit || return 1
22 done &&
23 echo "$commit" >.git/HEAD &&
24 - git clone -l ./. victim &&
24 + git-clone.sh -l ./. victim &&
25 cd victim &&
26 - git log &&
26 + git-log.sh &&
27 cd .. &&
28 echo $zero >.git/HEAD &&
29 parent=$zero &&
@@ -35,7 +35,7 @@ test_expect_success setup '
35 done &&
36 echo "$commit" >.git/HEAD &&
37 echo Rebase &&
38 - git log'
38 + git-log.sh'
39
40 test_expect_success \
41 'pushing rewound head should not barf but require --force' '
t/t6001-rev-list-merge-order.sh
+1 -1
@@ -45,7 +45,7 @@ grep_stderr()
45 }
46
47 date >path0
48 -git-update-cache --add path0
48 +git-update-index --add path0
49 save_tag tree git-write-tree
50 on_committer_date "1971-08-16 00:00:00" hide_error save_tag root unique_commit root tree
51 on_committer_date "1971-08-16 00:00:01" save_tag l0 unique_commit l0 tree -p root
t/t6002-rev-list-bisect.sh
+1 -1
@@ -40,7 +40,7 @@ test_bisection_diff()
40 }
41
42 date >path0
43 -git-update-cache --add path0
43 +git-update-index --add path0
44 save_tag tree git-write-tree
45 on_committer_date "1971-08-16 00:00:00" hide_error save_tag root unique_commit root tree
46 on_committer_date "1971-08-16 00:00:01" save_tag l0 unique_commit l0 tree -p root
t/t6003-rev-list-topo-order.sh
+1 -1
@@ -14,7 +14,7 @@ list_duplicates()
14 }
15
16 date >path0
17 -git-update-cache --add path0
17 +git-update-index --add path0
18 save_tag tree git-write-tree
19 on_committer_date "1971-08-16 00:00:00" hide_error save_tag root unique_commit root tree
20 on_committer_date "1971-08-16 00:00:01" save_tag l0 unique_commit l0 tree -p root
t/t6101-rev-parse-parents.sh
+1 -1
@@ -9,7 +9,7 @@ test_description='Test git-rev-parse with different parent options'
9 . ../t6000lib.sh # t6xxx specific functions
10
11 date >path0
12 -git-update-cache --add path0
12 +git-update-index --add path0
13 save_tag tree git-write-tree
14 hide_error save_tag start unique_commit "start" tree
15 save_tag second unique_commit "second" tree -p start
templates/hooks--commit-msg
+1 -1
@@ -1,7 +1,7 @@
1 #!/bin/sh
2 #
3 # An example hook script to check the commit log message.
4 -# Called by git-commit-script with one argument, the name of the file
4 +# Called by git-commit with one argument, the name of the file
5 # that has the commit message. The hook should exit with non-zero
6 # status after issuing an appropriate message if it wants to stop the
7 # commit. The hook is allowed to edit the commit message file.
templates/hooks--pre-commit
+2 -2
@@ -1,7 +1,7 @@
1 #!/bin/sh
2 #
3 # An example hook script to verify what is about to be committed.
4 -# Called by git-commit-script with no arguments. The hook should
4 +# Called by git-commit with no arguments. The hook should
5 # exit with non-zero status after issuing an appropriate message if
6 # it wants to stop the commit.
7 #
@@ -31,7 +31,7 @@ perl -e '
31 print STDERR "* $why (line $lineno)\n";
32 print STDERR "$filename:$lineno:$line\n";
33 }
34 - open $fh, "-|", qw(git-diff-cache -p -M --cached HEAD);
34 + open $fh, "-|", qw(git-diff-index -p -M --cached HEAD);
35 while (<$fh>) {
36 if (m|^diff --git a/(.*) b/\1$|) {
37 $filename = $1;
update-index.c renamed
+5 -5
@@ -9,7 +9,7 @@
9 * Default to not allowing changes to the list of files. The
10 * tool doesn't actually care, but this makes it harder to add
11 * files to the revision control by mistake by doing something
12 - * like "git-update-cache *" and suddenly having all the object
12 + * like "git-update-index *" and suddenly having all the object
13 * files be revision controlled.
14 */
15 static int allow_add = 0, allow_remove = 0, allow_replace = 0, not_new = 0, quiet = 0, info_only = 0;
@@ -44,7 +44,7 @@ static int add_file_to_cache(char *path)
44 /* When we used to have "path" and now we want to add
45 * "path/file", we need a way to remove "path" before
46 * being able to add "path/file". However,
47 - * "git-update-cache --remove path" would not work.
47 + * "git-update-index --remove path" would not work.
48 * --force-remove can be used but this is more user
49 * friendly, especially since we can do the opposite
50 * case just fine without --force-remove.
@@ -365,9 +365,9 @@ int main(int argc, char **argv)
365 }
366 if (!strcmp(path, "--cacheinfo")) {
367 if (i+3 >= argc)
368 - die("git-update-cache: --cacheinfo <mode> <sha1> <path>");
368 + die("git-update-index: --cacheinfo <mode> <sha1> <path>");
369 if (add_cacheinfo(argv[i+1], argv[i+2], argv[i+3]))
370 - die("git-update-cache: --cacheinfo cannot add %s", argv[i+3]);
370 + die("git-update-index: --cacheinfo cannot add %s", argv[i+3]);
371 i += 3;
372 continue;
373 }
@@ -393,7 +393,7 @@ int main(int argc, char **argv)
393 }
394 if (force_remove) {
395 if (remove_file_from_cache(path))
396 - die("git-update-cache: --force-remove cannot remove %s", path);
396 + die("git-update-index: --force-remove cannot remove %s", path);
397 continue;
398 }
399 if (add_file_to_cache(path))