@matheusbsbs / matheus-bagliano / commits / d7f078b8b9
Fork 0

Convert update-index references in docs to add.

Since `git add` is the approved porcelain for an end-user to invoke when they want to manipulate the index, porcelain documentation should steer the user to this command rather than the pure plumbing update-index. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Shawn O. Pearce committed Feb 17, 2007 at 04:43 UTC d7f078b8b92b1a29f9dd62c2c470fa51e15e2ffa
9 files changed +15 -14
Documentation/core-intro.txt
+2 -1
@@ -106,7 +106,8 @@ directory tree, and renaming a file does not change the object that
106 file is associated with in any way.
107
108 A blob is typically created when gitlink:git-update-index[1]
109 -is run, and its data can be accessed by gitlink:git-cat-file[1].
109 +(or gitlink:git-add[1]) is run, and its data can be accessed by
110 +gitlink:git-cat-file[1].
111
112 Tree Object
113 ~~~~~~~~~~~
Documentation/git-checkout.txt
+4 -3
@@ -61,7 +61,8 @@ OPTIONS
61 +
62 When a merge conflict happens, the index entries for conflicting
63 paths are left unmerged, and you need to resolve the conflicts
64 -and mark the resolved paths with `git update-index`.
64 +and mark the resolved paths with `git add` (or `git rm` if the merge
65 +should result in deletion of the path).
66
67 <new_branch>::
68 Name for the new branch.
@@ -179,11 +180,11 @@ fatal: merge program failed
180 At this point, `git diff` shows the changes cleanly merged as in
181 the previous example, as well as the changes in the conflicted
182 files. Edit and resolve the conflict and mark it resolved with
182 -`git update-index` as usual:
183 +`git add` as usual:
184 +
185 ------------
186 $ edit frotz
186 -$ git update-index frotz
187 +$ git add frotz
188 ------------
189
190
Documentation/git-merge.txt
+1 -1
@@ -136,7 +136,7 @@ After seeing a conflict, you can do two things:
136
137 * Resolve the conflicts. `git-diff` would report only the
138 conflicting paths because of the above 2. and 3.. Edit the
139 - working tree files into a desirable shape, `git-update-index`
139 + working tree files into a desirable shape, `git-add` or `git-rm`
140 them, to make the index file contain what the merge result
141 should be, and run `git-commit` to commit the result.
142
Documentation/git-rebase.txt
+1 -1
@@ -148,7 +148,7 @@ file you edit, you need to tell git that the conflict has been resolved,
148 typically this would be done with
149
150
151 - git update-index <filename>
151 + git add <filename>
152
153
154 After resolving the conflict manually and updating the index with the
Documentation/git-rerere.txt
+1 -2
@@ -163,8 +163,7 @@ If this three-way merge resolves cleanly, the result is written
163 out to your working tree file, so you would not have to manually
164 resolve it. Note that `git-rerere` leaves the index file alone,
165 so you still need to do the final sanity checks with `git diff`
166 -(or `git diff -c`) and `git update-index` when you are
167 -satisfied.
166 +(or `git diff -c`) and `git add` when you are satisfied.
167
168 As a convenience measure, `git-merge` automatically invokes
169 `git-rerere` when it exits with a failed automerge, which
Documentation/git-reset.txt
+2 -2
@@ -94,11 +94,11 @@ current HEAD.
94 <2> Rewind the master branch to get rid of those three commits.
95 <3> Switch to "topic/wip" branch and keep working.
96
97 -Undo update-index::
97 +Undo add::
98 +
99 ------------
100 $ edit <1>
101 -$ git-update-index frotz.c filfre.c
101 +$ git add frotz.c filfre.c
102 $ mailx <2>
103 $ git reset <3>
104 $ git pull git://info.example.com/ nitfol <4>
Documentation/git-runstatus.txt
+1 -1
@@ -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-index' before running 'git
19 +commit by running 'git add' (or 'git rm' if you are deleting) before running 'git
20 commit', and the latter paths are what you _would_ commit by
21 running 'git commit'.
22
Documentation/git-status.txt
+1 -1
@@ -15,7 +15,7 @@ DESCRIPTION
15 Examines paths in the working tree that has changes unrecorded
16 to the index file, and changes between the index file and the
17 current HEAD commit. The former paths are what you _could_
18 -commit by running 'git-update-index' before running 'git
18 +commit by running 'git add' before running 'git
19 commit', and the latter paths are what you _would_ commit by
20 running 'git commit'.
21
Documentation/tutorial-2.txt
+2 -2
@@ -227,7 +227,7 @@ $ git diff
227 @@ -1 +1,2 @@
228 hello world!
229 +hello world, again
230 -$ git update-index file.txt
230 +$ git add file.txt
231 $ git diff
232 ------------------------------------------------
233
@@ -260,7 +260,7 @@ hello world!
260 hello world, again
261 ------------------------------------------------
262
263 -So what our "git update-index" did was store a new blob and then put
263 +So what our "git add" did was store a new blob and then put
264 a reference to it in the index file. If we modify the file again,
265 we'll see that the new modifications are reflected in the "git-diff"
266 output: