Convert update-index references in docs to add.
authorShawn O. Pearce <spearce@spearce.org>
Sat, 17 Feb 2007 09:43:42 +0000 (04:43 -0500)
committerJunio C Hamano <junkio@cox.net>
Sat, 17 Feb 2007 18:20:27 +0000 (10:20 -0800)
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>
Documentation/core-intro.txt
Documentation/git-checkout.txt
Documentation/git-merge.txt
Documentation/git-rebase.txt
Documentation/git-rerere.txt
Documentation/git-reset.txt
Documentation/git-runstatus.txt
Documentation/git-status.txt
Documentation/tutorial-2.txt

index abafefc..6bee448 100644 (file)
@@ -106,7 +106,8 @@ directory tree, and renaming a file does not change the object that
 file is associated with in any way.
 
 A blob is typically created when gitlink:git-update-index[1]
-is run, and its data can be accessed by gitlink:git-cat-file[1].
+(or gitlink:git-add[1]) is run, and its data can be accessed by
+gitlink:git-cat-file[1].
 
 Tree Object
 ~~~~~~~~~~~
index e4ffde4..1ae77be 100644 (file)
@@ -61,7 +61,8 @@ OPTIONS
 +
 When a merge conflict happens, the index entries for conflicting
 paths are left unmerged, and you need to resolve the conflicts
-and mark the resolved paths with `git update-index`.
+and mark the resolved paths with `git add` (or `git rm` if the merge
+should result in deletion of the path).
 
 <new_branch>::
        Name for the new branch.
@@ -179,11 +180,11 @@ fatal: merge program failed
 At this point, `git diff` shows the changes cleanly merged as in
 the previous example, as well as the changes in the conflicted
 files.  Edit and resolve the conflict and mark it resolved with
-`git update-index` as usual:
+`git add` as usual:
 +
 ------------
 $ edit frotz
-$ git update-index frotz
+$ git add frotz
 ------------
 
 
index e53ff4b..9c08efa 100644 (file)
@@ -136,7 +136,7 @@ After seeing a conflict, you can do two things:
 
  * Resolve the conflicts.  `git-diff` would report only the
    conflicting paths because of the above 2. and 3..  Edit the
-   working tree files into a desirable shape, `git-update-index`
+   working tree files into a desirable shape, `git-add` or `git-rm`
    them, to make the index file contain what the merge result
    should be, and run `git-commit` to commit the result.
 
index a66b2d7..2f417a8 100644 (file)
@@ -148,7 +148,7 @@ file you edit, you need to tell git that the conflict has been resolved,
 typically this would be done with
 
 
-    git update-index <filename>
+    git add <filename>
 
 
 After resolving the conflict manually and updating the index with the
index 139b6eb..7ff9b05 100644 (file)
@@ -163,8 +163,7 @@ If this three-way merge resolves cleanly, the result is written
 out to your working tree file, so you would not have to manually
 resolve it.  Note that `git-rerere` leaves the index file alone,
 so you still need to do the final sanity checks with `git diff`
-(or `git diff -c`) and `git update-index` when you are
-satisfied.
+(or `git diff -c`) and `git add` when you are satisfied.
 
 As a convenience measure, `git-merge` automatically invokes
 `git-rerere` when it exits with a failed automerge, which
index 04475a9..5b55cda 100644 (file)
@@ -94,11 +94,11 @@ current HEAD.
 <2> Rewind the master branch to get rid of those three commits.
 <3> Switch to "topic/wip" branch and keep working.
 
-Undo update-index::
+Undo add::
 +
 ------------
 $ edit                                     <1>
-$ git-update-index frotz.c filfre.c
+$ git add frotz.c filfre.c
 $ mailx                                    <2>
 $ git reset                                <3>
 $ git pull git://info.example.com/ nitfol  <4>
index 89d7b92..8bb52f4 100644 (file)
@@ -16,7 +16,7 @@ DESCRIPTION
 Examines paths in the working tree that has changes unrecorded
 to the index file, and changes between the index file and the
 current HEAD commit.  The former paths are what you _could_
-commit by running 'git-update-index' before running 'git
+commit by running 'git add' (or 'git rm' if you are deleting) before running 'git
 commit', and the latter paths are what you _would_ commit by
 running 'git commit'.
 
index 03871e5..e9e193f 100644 (file)
@@ -15,7 +15,7 @@ DESCRIPTION
 Examines paths in the working tree that has changes unrecorded
 to the index file, and changes between the index file and the
 current HEAD commit.  The former paths are what you _could_
-commit by running 'git-update-index' before running 'git
+commit by running 'git add' before running 'git
 commit', and the latter paths are what you _would_ commit by
 running 'git commit'.
 
index 8d89992..af8d43b 100644 (file)
@@ -227,7 +227,7 @@ $ git diff
 @@ -1 +1,2 @@
  hello world!
 +hello world, again
-$ git update-index file.txt
+$ git add file.txt
 $ git diff
 ------------------------------------------------
 
@@ -260,7 +260,7 @@ hello world!
 hello world, again
 ------------------------------------------------
 
-So what our "git update-index" did was store a new blob and then put
+So what our "git add" did was store a new blob and then put
 a reference to it in the index file.  If we modify the file again,
 we'll see that the new modifications are reflected in the "git-diff"
 output: