{"thread":{"id":"6856","subject":"[PATCH] Convert update-index references in docs to add.","startedAt":"2007-02-17T09:43:42Z","lastAt":"2007-02-17T18:20:06Z","messageCount":2,"participants":["Shawn O. Pearce","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"34863","messageId":"20070217094342.GA496@spearce.org","threadId":"6856","inReplyTo":null,"subject":"[PATCH] Convert update-index references in docs to add.","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-02-17T09:43:42Z","receivedAt":"2007-02-17T09:43:42Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Since `git add` is the approved porcelain for an end-user to invoke\nwhen they want to manipulate the index, porcelain documentation\nshould steer the user to this command rather than the pure plumbing\nupdate-index.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n\n Maybe this isn't the best change to make.  I dunno.  I think it is\n cleaner to keep the user looking at add instead of update-index,\n but what do I know.  :-)\n\n Documentation/core-intro.txt    |    3 ++-\n Documentation/git-checkout.txt  |    6 +++---\n Documentation/git-merge.txt     |    2 +-\n Documentation/git-rebase.txt    |    2 +-\n Documentation/git-rerere.txt    |    3 +--\n Documentation/git-reset.txt     |    4 ++--\n Documentation/git-runstatus.txt |    2 +-\n Documentation/git-status.txt    |    2 +-\n Documentation/tutorial-2.txt    |    4 ++--\n 9 files changed, 14 insertions(+), 14 deletions(-)\n\ndiff --git a/Documentation/core-intro.txt b/Documentation/core-intro.txt\nindex 24b060b..eea44d9 100644\n--- a/Documentation/core-intro.txt\n+++ b/Documentation/core-intro.txt\n@@ -106,7 +106,8 @@ directory tree, and renaming a file does not change the object that\n file is associated with in any way.\n \n A blob is typically created when gitlink:git-update-index[1]\n-is run, and its data can be accessed by gitlink:git-cat-file[1].\n+(or gitlink:git-add[1]) is run, and its data can be accessed by\n+gitlink:git-cat-file[1].\n \n Tree Object\n ~~~~~~~~~~~\ndiff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt\nindex e4ffde4..f65514e 100644\n--- a/Documentation/git-checkout.txt\n+++ b/Documentation/git-checkout.txt\n@@ -61,7 +61,7 @@ OPTIONS\n +\n When a merge conflict happens, the index entries for conflicting\n paths are left unmerged, and you need to resolve the conflicts\n-and mark the resolved paths with `git update-index`.\n+and mark the resolved paths with `git add`.\n \n <new_branch>::\n \tName for the new branch.\n@@ -179,11 +179,11 @@ fatal: merge program failed\n At this point, `git diff` shows the changes cleanly merged as in\n the previous example, as well as the changes in the conflicted\n files.  Edit and resolve the conflict and mark it resolved with\n-`git update-index` as usual:\n+`git add` as usual:\n +\n ------------\n $ edit frotz\n-$ git update-index frotz\n+$ git add frotz\n ------------\n \n \ndiff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt\nindex e53ff4b..911c69b 100644\n--- a/Documentation/git-merge.txt\n+++ b/Documentation/git-merge.txt\n@@ -136,7 +136,7 @@ After seeing a conflict, you can do two things:\n \n  * Resolve the conflicts.  `git-diff` would report only the\n    conflicting paths because of the above 2. and 3..  Edit the\n-   working tree files into a desirable shape, `git-update-index`\n+   working tree files into a desirable shape, `git-add`\n    them, to make the index file contain what the merge result\n    should be, and run `git-commit` to commit the result.\n \ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex f2ef1f7..7110466 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -142,7 +142,7 @@ file you edit, you need to tell git that the conflict has been resolved,\n typically this would be done with\n \n \n-    git update-index <filename>\n+    git add <filename>\n \n \n After resolving the conflict manually and updating the index with the\ndiff --git a/Documentation/git-rerere.txt b/Documentation/git-rerere.txt\nindex 139b6eb..7ff9b05 100644\n--- a/Documentation/git-rerere.txt\n+++ b/Documentation/git-rerere.txt\n@@ -163,8 +163,7 @@ If this three-way merge resolves cleanly, the result is written\n out to your working tree file, so you would not have to manually\n resolve it.  Note that `git-rerere` leaves the index file alone,\n so you still need to do the final sanity checks with `git diff`\n-(or `git diff -c`) and `git update-index` when you are\n-satisfied.\n+(or `git diff -c`) and `git add` when you are satisfied.\n \n As a convenience measure, `git-merge` automatically invokes\n `git-rerere` when it exits with a failed automerge, which\ndiff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt\nindex 04475a9..5b55cda 100644\n--- a/Documentation/git-reset.txt\n+++ b/Documentation/git-reset.txt\n@@ -94,11 +94,11 @@ current HEAD.\n <2> Rewind the master branch to get rid of those three commits.\n <3> Switch to \"topic/wip\" branch and keep working.\n \n-Undo update-index::\n+Undo add::\n +\n ------------\n $ edit                                     <1>\n-$ git-update-index frotz.c filfre.c\n+$ git add frotz.c filfre.c\n $ mailx                                    <2>\n $ git reset                                <3>\n $ git pull git://info.example.com/ nitfol  <4>\ndiff --git a/Documentation/git-runstatus.txt b/Documentation/git-runstatus.txt\nindex 89d7b92..e95662b 100644\n--- a/Documentation/git-runstatus.txt\n+++ b/Documentation/git-runstatus.txt\n@@ -16,7 +16,7 @@ DESCRIPTION\n Examines paths in the working tree that has changes unrecorded\n to the index file, and changes between the index file and the\n current HEAD commit.  The former paths are what you _could_\n-commit by running 'git-update-index' before running 'git\n+commit by running 'git add' before running 'git\n commit', and the latter paths are what you _would_ commit by\n running 'git commit'.\n \ndiff --git a/Documentation/git-status.txt b/Documentation/git-status.txt\nindex 03871e5..e9e193f 100644\n--- a/Documentation/git-status.txt\n+++ b/Documentation/git-status.txt\n@@ -15,7 +15,7 @@ DESCRIPTION\n Examines paths in the working tree that has changes unrecorded\n to the index file, and changes between the index file and the\n current HEAD commit.  The former paths are what you _could_\n-commit by running 'git-update-index' before running 'git\n+commit by running 'git add' before running 'git\n commit', and the latter paths are what you _would_ commit by\n running 'git commit'.\n \ndiff --git a/Documentation/tutorial-2.txt b/Documentation/tutorial-2.txt\nindex 8d89992..af8d43b 100644\n--- a/Documentation/tutorial-2.txt\n+++ b/Documentation/tutorial-2.txt\n@@ -227,7 +227,7 @@ $ git diff\n @@ -1 +1,2 @@\n  hello world!\n +hello world, again\n-$ git update-index file.txt\n+$ git add file.txt\n $ git diff\n ------------------------------------------------\n \n@@ -260,7 +260,7 @@ hello world!\n hello world, again\n ------------------------------------------------\n \n-So what our \"git update-index\" did was store a new blob and then put\n+So what our \"git add\" did was store a new blob and then put\n a reference to it in the index file.  If we modify the file again,\n we'll see that the new modifications are reflected in the \"git-diff\"\n output:\n-- \n1.5.0.552.ge1b1c\n"},{"id":"34882","messageId":"7vvei0tzmx.fsf@assigned-by-dhcp.cox.net","threadId":"6856","inReplyTo":"20070217094342.GA496@spearce.org","subject":"Re: [PATCH] Convert update-index references in docs to add.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-17T18:20:06Z","receivedAt":"2007-02-17T18:20:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Shawn O. Pearce\" <spearce@spearce.org> writes:\n\n> Since `git add` is the approved porcelain for an end-user to invoke\n> when they want to manipulate the index, porcelain documentation\n> should steer the user to this command rather than the pure plumbing\n> update-index.\n>\n> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>\n> ---\n>\n>  Maybe this isn't the best change to make.  I dunno.  I think it is\n>  cleaner to keep the user looking at add instead of update-index,\n>  but what do I know.  :-)\n\nI think I agree with most of your changes, except in a few\nplaces we should suggest 'git rm' to resolve conflict as\ndeletion of paths.  On top of your patch, something like the\nattached.\n\nOne thing I suspect is that currently we refuse to 'git rm' if\nthe index does not match working tree and HEAD, but it might\nmake sense to skip that check when the path is unmerged in the\nindex.\n\n\ndiff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt\nindex f65514e..1ae77be 100644\n--- a/Documentation/git-checkout.txt\n+++ b/Documentation/git-checkout.txt\n@@ -61,7 +61,8 @@ OPTIONS\n +\n When a merge conflict happens, the index entries for conflicting\n paths are left unmerged, and you need to resolve the conflicts\n-and mark the resolved paths with `git add`.\n+and mark the resolved paths with `git add` (or `git rm` if the merge\n+should result in deletion of the path).\n \n <new_branch>::\n \tName for the new branch.\ndiff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt\nindex 911c69b..9c08efa 100644\n--- a/Documentation/git-merge.txt\n+++ b/Documentation/git-merge.txt\n@@ -136,7 +136,7 @@ After seeing a conflict, you can do two things:\n \n  * Resolve the conflicts.  `git-diff` would report only the\n    conflicting paths because of the above 2. and 3..  Edit the\n-   working tree files into a desirable shape, `git-add`\n+   working tree files into a desirable shape, `git-add` or `git-rm`\n    them, to make the index file contain what the merge result\n    should be, and run `git-commit` to commit the result.\n \ndiff --git a/Documentation/git-runstatus.txt b/Documentation/git-runstatus.txt\nindex e95662b..8bb52f4 100644\n--- a/Documentation/git-runstatus.txt\n+++ b/Documentation/git-runstatus.txt\n@@ -16,7 +16,7 @@ DESCRIPTION\n Examines paths in the working tree that has changes unrecorded\n to the index file, and changes between the index file and the\n current HEAD commit.  The former paths are what you _could_\n-commit by running 'git add' before running 'git\n+commit by running 'git add' (or 'git rm' if you are deleting) before running 'git\n commit', and the latter paths are what you _would_ commit by\n running 'git commit'.\n \n"}]}