{"thread":{"id":"47436","subject":"[PATCH] doc: Modify git-add doc to say \"staging area\"","startedAt":"2017-12-13T02:34:09Z","lastAt":"2017-12-14T21:29:06Z","messageCount":15,"participants":["David A. Wheeler","Jacob Keller","Ævar Arnfjörð Bjarmason","Junio C Hamano","Stefan Beller"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"334734","messageId":"E1eOwqn-0005Bd-OB@rmmprod05.runbox","threadId":"47436","inReplyTo":null,"subject":"[PATCH] doc: Modify git-add doc to say \"staging area\"","fromName":"David A. Wheeler","fromEmail":"dwheeler@dwheeler.com","sentAt":"2017-12-13T02:32:49Z","receivedAt":"2017-12-13T02:34:09Z","isPatch":true,"sender":{"key":"dwheeler@dwheeler.com","avatar":"https://avatars.githubusercontent.com/u/813150?v=4"},"body":"Change the documentation of git-add so that it consistently uses\nthe phrase \"staging area\".  The current git documentation uses\ninconsistent terminology (\"index\", \"cache\", and \"staging area\").\nThis commit switches git-add's documentation to consistently use\nthe phrase \"staging area\", which is higher-level and should be less\nconfusing for new users.\n\nSigned-off-by: David A. Wheeler <dwheeler@dwheeler.com>\n---\n Documentation/git-add.txt | 104 ++++++++++++++++++++++++----------------------\n 1 file changed, 54 insertions(+), 50 deletions(-)\n\ndiff --git a/Documentation/git-add.txt b/Documentation/git-add.txt\nindex d50fa339d..927a152b0 100644\n--- a/Documentation/git-add.txt\n+++ b/Documentation/git-add.txt\n@@ -3,7 +3,7 @@ git-add(1)\n \n NAME\n ----\n-git-add - Add file contents to the index\n+git-add - Add file contents to the staging area\n \n SYNOPSIS\n --------\n@@ -15,23 +15,24 @@ SYNOPSIS\n \n DESCRIPTION\n -----------\n-This command updates the index using the current content found in\n-the working tree, to prepare the content staged for the next commit.\n-It typically adds the current content of existing paths as a whole,\n+This command updates the staging area using the current content found\n+in the working tree.\n+This command typically adds the current content of existing paths as a whole,\n but with some options it can also be used to add content with\n only part of the changes made to the working tree files applied, or\n remove paths that do not exist in the working tree anymore.\n \n-The \"index\" holds a snapshot of the content of the working tree, and it\n-is this snapshot that is taken as the contents of the next commit.  Thus\n-after making any changes to the working tree, and before running\n-the commit command, you must use the `add` command to add any new or\n-modified files to the index.\n+The staging area (historically called the \"index\" or \"cache\")\n+holds a snapshot of the content of the working tree, and it\n+is this snapshot that is taken by default as the contents of the next commit.\n+Thus after making any changes to the working tree, and before running\n+the commit command, you can use the `add` command to add any new or\n+modified files to the staging area.\n \n This command can be performed multiple times before a commit.  It only\n adds the content of the specified file(s) at the time the add command is\n run; if you want subsequent changes included in the next commit, then\n-you must run `git add` again to add the new content to the index.\n+you must run `git add` again to add the new content to the staging area.\n \n The `git status` command can be used to obtain a summary of which\n files have changes that are staged for the next commit.\n@@ -45,7 +46,9 @@ be used to add ignored files with the `-f` (force) option.\n \n Please see linkgit:git-commit[1] for alternative ways to add content to a\n commit.\n-\n+For example, you can use the git commit `-a` option to first automatically\n+add to the staging area all the files that have been have been\n+modified or deleted in the working tree.\n \n OPTIONS\n -------\n@@ -53,7 +56,7 @@ OPTIONS\n \tFiles to add content from.  Fileglobs (e.g. `*.c`) can\n \tbe given to add all matching files.  Also a\n \tleading directory name (e.g. `dir` to add `dir/file1`\n-\tand `dir/file2`) can be given to update the index to\n+\tand `dir/file2`) can be given to update the staging area to\n \tmatch the current state of the directory as a whole (e.g.\n \tspecifying `dir` will record not just a file `dir/file1`\n \tmodified in the working tree, a file `dir/file2` added to\n@@ -81,16 +84,16 @@ in linkgit:gitglossary[7].\n -i::\n --interactive::\n \tAdd modified contents in the working tree interactively to\n-\tthe index. Optional path arguments may be supplied to limit\n+\tthe staging area. Optional path arguments may be supplied to limit\n \toperation to a subset of the working tree. See ``Interactive\n \tmode'' for details.\n \n -p::\n --patch::\n-\tInteractively choose hunks of patch between the index and the\n-\twork tree and add them to the index. This gives the user a chance\n+\tInteractively choose hunks of patch between the staging area and the\n+\twork tree and add them to the staging area. This gives the user a chance\n \tto review the difference before adding modified contents to the\n-\tindex.\n+\tstaging area.\n +\n This effectively runs `add --interactive`, but bypasses the\n initial command menu and directly jumps to the `patch` subcommand.\n@@ -98,20 +101,20 @@ See ``Interactive mode'' for details.\n \n -e::\n --edit::\n-\tOpen the diff vs. the index in an editor and let the user\n+\tOpen the diff vs. the staging area in an editor and let the user\n \tedit it.  After the editor was closed, adjust the hunk headers\n-\tand apply the patch to the index.\n+\tand apply the patch to the staging area.\n +\n The intent of this option is to pick and choose lines of the patch to\n apply, or even to modify the contents of lines to be staged. This can be\n quicker and more flexible than using the interactive hunk selector.\n However, it is easy to confuse oneself and create a patch that does not\n-apply to the index. See EDITING PATCHES below.\n+apply to the staging area. See EDITING PATCHES below.\n \n -u::\n --update::\n-\tUpdate the index just where it already has an entry matching\n-\t<pathspec>.  This removes as well as modifies index entries to\n+\tUpdate the staging area just where it already has an entry matching\n+\t<pathspec>.  This removes as well as modifies staging area entries to\n \tmatch the working tree, but adds no new files.\n +\n If no <pathspec> is given when `-u` option is used, all\n@@ -122,9 +125,9 @@ subdirectories).\n -A::\n --all::\n --no-ignore-removal::\n-\tUpdate the index not only where the working tree has a file\n-\tmatching <pathspec> but also where the index already has an\n-\tentry.\tThis adds, modifies, and removes index entries to\n+\tUpdate the staging area not only where the working tree has a file\n+\tmatching <pathspec> but also where the staging area already has an\n+\tentry.\tThis adds, modifies, and removes staging area entries to\n \tmatch the working tree.\n +\n If no <pathspec> is given when `-A` option is used, all\n@@ -134,8 +137,8 @@ subdirectories).\n \n --no-all::\n --ignore-removal::\n-\tUpdate the index by adding new files that are unknown to the\n-\tindex and files modified in the working tree, but ignore\n+\tUpdate the staging area by adding new files that are not in the\n+\tstaging area and files modified in the working tree, but ignore\n \tfiles that have been removed from the working tree.  This\n \toption is a no-op when no <pathspec> is used.\n +\n@@ -146,18 +149,19 @@ for \"git add --no-all <pathspec>...\", i.e. ignored removed files.\n -N::\n --intent-to-add::\n \tRecord only the fact that the path will be added later. An entry\n-\tfor the path is placed in the index with no content. This is\n+\tfor the path is placed in the staging area with no content. This is\n \tuseful for, among other things, showing the unstaged content of\n \tsuch files with `git diff` and committing them with `git commit\n \t-a`.\n \n --refresh::\n \tDon't add the file(s), but only refresh their stat()\n-\tinformation in the index.\n+\tinformation in the staging area.\n \n --ignore-errors::\n-\tIf some files could not be added because of errors indexing\n-\tthem, do not abort the operation, but continue adding the\n+\tIf some files could not be added because of errors adding them\n+        to the staging area,\n+\tdo not abort the operation, but continue adding the\n \tothers. The command shall still exit with non-zero status.\n \tThe configuration variable `add.ignoreErrors` can be set to\n \ttrue to make this the default behaviour.\n@@ -170,21 +174,21 @@ for \"git add --no-all <pathspec>...\", i.e. ignored removed files.\n \n --no-warn-embedded-repo::\n \tBy default, `git add` will warn when adding an embedded\n-\trepository to the index without using `git submodule add` to\n+\trepository to the staging area without using `git submodule add` to\n \tcreate an entry in `.gitmodules`. This option will suppress the\n \twarning (e.g., if you are manually performing operations on\n \tsubmodules).\n \n --renormalize::\n \tApply the \"clean\" process freshly to all tracked files to\n-\tforcibly add them again to the index.  This is useful after\n+\tforcibly add them again to the staging area.  This is useful after\n \tchanging `core.autocrlf` configuration or the `text` attribute\n \tin order to correct files added with wrong CRLF/LF line endings.\n \tThis option implies `-u`.\n \n --chmod=(+|-)x::\n \tOverride the executable bit of the added files.  The executable\n-\tbit is only changed in the index, the files on disk are left\n+\tbit is only changed in the staging area, the files on disk are left\n \tunchanged.\n \n \\--::\n@@ -251,8 +255,8 @@ The main command loop has 6 subcommands (plus help and quit).\n \n status::\n \n-   This shows the change between HEAD and index (i.e. what will be\n-   committed if you say `git commit`), and between index and\n+   This shows the change between HEAD and staging area (i.e. what will be\n+   committed if you say `git commit`), and between staging area and\n    working tree files (i.e. what you could stage further before\n    `git commit` using `git add`) for each path.  A sample output\n    looks like this:\n@@ -265,11 +269,11 @@ status::\n +\n It shows that foo.png has differences from HEAD (but that is\n binary so line count cannot be shown) and there is no\n-difference between indexed copy and the working tree\n-version (if the working tree version were also different,\n+difference between the versions in the staging area and the working tree\n+(if the working tree version were also different,\n 'binary' would have been shown in place of 'nothing').  The\n other file, git-add{litdd}interactive.perl, has 403 lines added\n-and 35 lines deleted if you commit what is in the index, but\n+and 35 lines deleted if you commit what is in the staging area, but\n working tree file has further modifications (one addition and\n one deletion).\n \n@@ -300,7 +304,7 @@ Update>> -2\n ------------\n +\n After making the selection, answer with an empty line to stage the\n-contents of working tree files for selected paths in the index.\n+contents of working tree files for selected paths in the staging area.\n \n revert::\n \n@@ -311,12 +315,12 @@ revert::\n add untracked::\n \n   This has a very similar UI to 'update' and\n-  'revert', and lets you add untracked paths to the index.\n+  'revert', and lets you add untracked paths to the staging area.\n \n patch::\n \n   This lets you choose one path out of a 'status' like selection.\n-  After choosing the path, it presents the diff between the index\n+  After choosing the path, it presents the diff between the staging area\n   and the working tree file and asks you if you want to stage\n   the change of each hunk.  You can select one of the following\n   options and type return:\n@@ -337,7 +341,7 @@ patch::\n        ? - print help\n +\n After deciding the fate for all hunks, if there is any hunk\n-that was chosen, the index is updated with the selected hunks.\n+that was chosen, the staging area is updated with the selected hunks.\n +\n You can omit having to type return here, by setting the configuration\n variable `interactive.singleKey` to `true`.\n@@ -345,7 +349,7 @@ variable `interactive.singleKey` to `true`.\n diff::\n \n   This lets you review what will be committed (i.e. between\n-  HEAD and index).\n+  HEAD and staging area).\n \n \n EDITING PATCHES\n@@ -353,10 +357,10 @@ EDITING PATCHES\n \n Invoking `git add -e` or selecting `e` from the interactive hunk\n selector will open a patch in your editor; after the editor exits, the\n-result is applied to the index. You are free to make arbitrary changes\n+result is applied to the staging area. You are free to make arbitrary changes\n to the patch, but note that some changes may have confusing results, or\n even result in a patch that cannot be applied.  If you want to abort the\n-operation entirely (i.e., stage nothing new in the index), simply delete\n+operation entirely (i.e., stage nothing new in the staging area), simply delete\n all lines of the patch. The list below describes some common things you\n may see in a patch, and which editing operations make sense on them.\n \n@@ -377,13 +381,13 @@ Modified content is represented by \"-\" lines (removing the old content)\n followed by \"{plus}\" lines (adding the replacement content). You can\n prevent staging the modification by converting \"-\" lines to \" \", and\n removing \"{plus}\" lines. Beware that modifying only half of the pair is\n-likely to introduce confusing changes to the index.\n+likely to introduce confusing changes to the staging area.\n --\n \n There are also more complex operations that can be performed. But beware\n-that because the patch is applied only to the index and not the working\n-tree, the working tree will appear to \"undo\" the change in the index.\n-For example, introducing a new line into the index that is in neither\n+that because the patch is applied only to the staging area and not the working\n+tree, the working tree will appear to \"undo\" the change in the staging area.\n+For example, introducing a new line into the staging area that is in neither\n the HEAD nor the working tree will stage the new line for commit, but\n the line will appear to be reverted in the working tree.\n \n@@ -392,7 +396,7 @@ Avoid using these constructs, or do so with extreme caution.\n --\n removing untouched content::\n \n-Content which does not differ between the index and working tree may be\n+Content which does not differ between the staging area and working tree may be\n shown on context lines, beginning with a \" \" (space).  You can stage\n context lines for removal by converting the space to a \"-\". The\n resulting working tree file will appear to re-add the content.\n-- \n2.15.1\n\n\n"},{"id":"334739","messageId":"CA+P7+xrWFE+6t-Z8cGQX5WtZP1_EQSa+J7vF65dLDSOnLfFxXQ@mail.gmail.com","threadId":"47436","inReplyTo":"E1eOwqn-0005Bd-OB@rmmprod05.runbox","subject":"Re: [PATCH] doc: Modify git-add doc to say \"staging area\"","fromName":"Jacob Keller","fromEmail":"jacob.keller@gmail.com","sentAt":"2017-12-13T05:40:12Z","receivedAt":"2017-12-13T05:40:38Z","isPatch":true,"sender":{"key":"jacob.keller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/874719?v=4"},"body":"On Tue, Dec 12, 2017 at 6:32 PM, David A. Wheeler <dwheeler@dwheeler.com> wrote:\n> Change the documentation of git-add so that it consistently uses\n> the phrase \"staging area\".  The current git documentation uses\n> inconsistent terminology (\"index\", \"cache\", and \"staging area\").\n> This commit switches git-add's documentation to consistently use\n> the phrase \"staging area\", which is higher-level and should be less\n> confusing for new users.\n>\n\nI know we've used various terms for this concept across a lot of the\ndocumentation. However, I was under the impression that we most\nexplicitly used \"index\" rather than \"staging area\".\n\nAdditionally, I think there are many other locations which\nconsistently use \"index\" as the term already.\n\nThanks,\nJake\n"},{"id":"334740","messageId":"01075529-4B7B-4C05-927F-0504315F2B3F@dwheeler.com","threadId":"47436","inReplyTo":"CA+P7+xrWFE+6t-Z8cGQX5WtZP1_EQSa+J7vF65dLDSOnLfFxXQ@mail.gmail.com","subject":"Re: [PATCH] doc: Modify git-add doc to say \"staging area\"","fromName":"David A. Wheeler","fromEmail":"dwheeler@dwheeler.com","sentAt":"2017-12-13T05:46:12Z","receivedAt":"2017-12-13T05:46:36Z","isPatch":true,"sender":{"key":"dwheeler@dwheeler.com","avatar":"https://avatars.githubusercontent.com/u/813150?v=4"},"body":"On December 13, 2017 12:40:12 AM EST, Jacob Keller <jacob.keller@gmail.com> wrote:\n>I know we've used various terms for this concept across a lot of the\n>documentation. However, I was under the impression that we most\n>explicitly used \"index\" rather than \"staging area\".\n\nI think \"staging area\" is the better term. It focuses on its purpose, and it is also less confusing (\"index\" and \"cache\" have other meanings in many of the repos managed by git).\n\n\n--- David A.Wheeler\n"},{"id":"334742","messageId":"CACBZZX5XDKwwXWtH8V9QD5v-4i+nHPuZ8x2n_Z3zuexQmg2mgw@mail.gmail.com","threadId":"47436","inReplyTo":"01075529-4B7B-4C05-927F-0504315F2B3F@dwheeler.com","subject":"Re: [PATCH] doc: Modify git-add doc to say \"staging area\"","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-12-13T12:54:04Z","receivedAt":"2017-12-13T12:54:38Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Wed, Dec 13, 2017 at 6:46 AM, David A. Wheeler <dwheeler@dwheeler.com> wrote:\n> On December 13, 2017 12:40:12 AM EST, Jacob Keller <jacob.keller@gmail.com> wrote:\n>>I know we've used various terms for this concept across a lot of the\n>>documentation. However, I was under the impression that we most\n>>explicitly used \"index\" rather than \"staging area\".\n>\n> I think \"staging area\" is the better term. It focuses on its purpose, and it is also less confusing (\"index\" and \"cache\" have other meanings in many of the repos managed by git).\n\nAfter your patch the majority of the docs will still talk about\n\"index\", is this part of some larger series, perhaps it would be good\nto see it all at once...\n"},{"id":"334760","messageId":"xmqq8te6y30t.fsf@gitster.mtv.corp.google.com","threadId":"47436","inReplyTo":"CA+P7+xrWFE+6t-Z8cGQX5WtZP1_EQSa+J7vF65dLDSOnLfFxXQ@mail.gmail.com","subject":"Re: [PATCH] doc: Modify git-add doc to say \"staging area\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-12-13T17:02:42Z","receivedAt":"2017-12-13T17:02:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jacob Keller <jacob.keller@gmail.com> writes:\n\n> I know we've used various terms for this concept across a lot of the\n> documentation. However, I was under the impression that we most\n> explicitly used \"index\" rather than \"staging area\".\n>\n> Additionally, I think there are many other locations which\n> consistently use \"index\" as the term already.\n\nAnother reason why we would want to standardize in the other\ndirection is because \"X acts as Y\" does not mean \"X is Y\".\n\nIt is true that we (and also \"newbie friendly\" tutorials) often\nexplain the index like so: \"When working towards the next commit,\nyou improve the contents a bit in the working tree, you 'git add' it\nto the index to make the contents of the index closer to what you\nwant to have the next commit.  The index works like the staging\narea.\"\n\nBut that is not the only thing the index does.  When \"git merge\"\nfinds conflicting changes, it adds the contents for common, our and\ntheir variants to the index for the path.  This is quite different\nfrom how you use the index \"as staging area\"; the index is being\nused as the \"merging area\".  When \"git clean\" wants to see which\npaths it finds on the filesystem are not of interest, it consults\nthe index, which acts as the list of paths that are of interest.\n"},{"id":"334772","messageId":"E1ePC33-000710-2u@rmmprod07.runbox","threadId":"47436","inReplyTo":"xmqq8te6y30t.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] doc: Modify git-add doc to say \"staging area\"","fromName":"David A. Wheeler","fromEmail":"dwheeler@dwheeler.com","sentAt":"2017-12-13T18:46:28Z","receivedAt":"2017-12-13T18:46:37Z","isPatch":true,"sender":{"key":"dwheeler@dwheeler.com","avatar":"https://avatars.githubusercontent.com/u/813150?v=4"},"body":"On Wed, 13 Dec 2017 09:02:42 -0800, Junio C Hamano <gitster@pobox.com> wrote:\n> .. But that is not the only thing the index does.  When \"git merge\"\n> finds conflicting changes, it adds the contents for common, our and\n> their variants to the index for the path.  This is quite different\n> from how you use the index \"as staging area\"; the index is being\n> used as the \"merging area\".  When \"git clean\" wants to see which\n> paths it finds on the filesystem are not of interest, it consults\n> the index, which acts as the list of paths that are of interest.\n\nIf the phrase \"staging area\" is consistently used *instead* of index,\nthere's no problem. E.g., \"git clean consults the staging area\"\nconveys exactly the same information as \"git clean consults the index\"\nwhen index == staging area.\n\nThe term \"index\" has too many *other* meanings.\n\n--- David A. Wheeler\n"},{"id":"334812","messageId":"662C691D-7263-4469-87F4-4BA8A50CC4E8@dwheeler.com","threadId":"47436","inReplyTo":"CACBZZX5XDKwwXWtH8V9QD5v-4i+nHPuZ8x2n_Z3zuexQmg2mgw@mail.gmail.com","subject":"Re: [PATCH] doc: Modify git-add doc to say \"staging area\"","fromName":"David A. Wheeler","fromEmail":"dwheeler@dwheeler.com","sentAt":"2017-12-14T17:48:10Z","receivedAt":"2017-12-14T17:48:37Z","isPatch":true,"sender":{"key":"dwheeler@dwheeler.com","avatar":"https://avatars.githubusercontent.com/u/813150?v=4"},"body":"On December 13, 2017 7:54:04 AM EST, \"Ævar Arnfjörð Bjarmason\" <avarab@gmail.com> wrote:\n>After your patch the majority of the docs will still talk about\n>\"index\", is this part of some larger series, perhaps it would be good\n>to see it all at once...\n\nYes, this would be part of a larger series.\n\nI'm happy to do the work, but I don't want to do it if it's just going to be rejected.\n\nThe work is very straightforward, in almost all cases you simply replace the word index with the phrase staging area.  The change is similar for the word cache.  So I'm not sure what seeing it all at once would do for anybody.\n\nAre there one or two other files that you would like to see transformed to see as an example?  If you're just looking for a sense of it, that should be enough.\n\n\n\n\n--- David A.Wheeler\n"},{"id":"334813","messageId":"87wp1pb3e1.fsf@evledraar.gmail.com","threadId":"47436","inReplyTo":"662C691D-7263-4469-87F4-4BA8A50CC4E8@dwheeler.com","subject":"Re: [PATCH] doc: Modify git-add doc to say \"staging area\"","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-12-14T17:55:34Z","receivedAt":"2017-12-14T17:55:43Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Dec 14 2017, David A. Wheeler jotted:\n\n> On December 13, 2017 7:54:04 AM EST, \"Ævar Arnfjörð Bjarmason\" <avarab@gmail.com> wrote:\n>>After your patch the majority of the docs will still talk about\n>>\"index\", is this part of some larger series, perhaps it would be good\n>>to see it all at once...\n>\n> Yes, this would be part of a larger series.\n>\n> I'm happy to do the work, but I don't want to do it if it's just going to be rejected.\n>\n> The work is very straightforward, in almost all cases you simply replace the word index with the phrase staging area.  The change is similar for the word cache.  So I'm not sure what seeing it all at once would do for anybody.\n>\n> Are there one or two other files that you would like to see transformed to see as an example?  If you're just looking for a sense of it, that should be enough.\n\nNo I get the idea, I'm just wondering if you'll continue to work on\nthis, because if not mentioning \"staging area\" in more places without\ncontinuing to eradicate \"index\" isn't going to improve things much, and\npossibly make it worse. I like the direction of this series.\n"},{"id":"334815","messageId":"xmqq6099uqq9.fsf@gitster.mtv.corp.google.com","threadId":"47436","inReplyTo":"CACBZZX5XDKwwXWtH8V9QD5v-4i+nHPuZ8x2n_Z3zuexQmg2mgw@mail.gmail.com","subject":"Re: [PATCH] doc: Modify git-add doc to say \"staging area\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-12-14T18:08:46Z","receivedAt":"2017-12-14T18:08:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> On Wed, Dec 13, 2017 at 6:46 AM, David A. Wheeler <dwheeler@dwheeler.com> wrote:\n>> On December 13, 2017 12:40:12 AM EST, Jacob Keller <jacob.keller@gmail.com> wrote:\n>>>I know we've used various terms for this concept across a lot of the\n>>>documentation. However, I was under the impression that we most\n>>>explicitly used \"index\" rather than \"staging area\".\n>>\n>> I think \"staging area\" is the better term. It focuses on its purpose, and it is also less confusing (\"index\" and \"cache\" have other meanings in many of the repos managed by git).\n>\n> After your patch the majority of the docs will still talk about\n> \"index\", is this part of some larger series, perhaps it would be good\n> to see it all at once...\n\n... or none of it.  I do not quite see a point of spending list\nbandwidth on a change like this one.\n"},{"id":"334818","messageId":"CAGZ79kZeMVLesunBzW5hhN-snL8fBXdjPgy=Tt8JCDmhDePDZA@mail.gmail.com","threadId":"47436","inReplyTo":"xmqq6099uqq9.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] doc: Modify git-add doc to say \"staging area\"","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2017-12-14T18:24:00Z","receivedAt":"2017-12-14T18:24:10Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Thu, Dec 14, 2017 at 10:08 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n>\n>> On Wed, Dec 13, 2017 at 6:46 AM, David A. Wheeler <dwheeler@dwheeler.com> wrote:\n>>> On December 13, 2017 12:40:12 AM EST, Jacob Keller <jacob.keller@gmail.com> wrote:\n>>>>I know we've used various terms for this concept across a lot of the\n>>>>documentation. However, I was under the impression that we most\n>>>>explicitly used \"index\" rather than \"staging area\".\n>>>\n>>> I think \"staging area\" is the better term. It focuses on its purpose, and it is also less confusing (\"index\" and \"cache\" have other meanings in many of the repos managed by git).\n>>\n>> After your patch the majority of the docs will still talk about\n>> \"index\", is this part of some larger series, perhaps it would be good\n>> to see it all at once...\n>\n> ... or none of it.  I do not quite see a point of spending list\n> bandwidth on a change like this one.\n\nI think wording (as well as its consistency) in the documentation\nis rather important.\n\nJust the other day I was reading[1], yet another blog explaining\nwhy git sucks. TL;DR:\n(1) (a) The staging area is an advanced concept\n    and should be disabled by default\n    (b) and is documented super confusingly.\n(2) Branches and Remotes Management is\n    Complex and Time-Consuming\n(3) its ecosystem (GitHub et al.) is not pushing for\n    innovation, because \"forks are not the right model\".\n\n[1] https://gregoryszorc.com/blog/2017/12/11/high-level-problems-with-git-and-how-to-fix-them/\n\nWhen I saw the original patch, I assumed it was a reaction to this\nblog and attempting to fix (1b), but maybe it is unrelated.\n\nAnyway I think spending list band width on good documentation is\nnot bandwidth wasted.\n\nStefan\n"},{"id":"334823","messageId":"xmqqk1xpta93.fsf@gitster.mtv.corp.google.com","threadId":"47436","inReplyTo":"CAGZ79kZeMVLesunBzW5hhN-snL8fBXdjPgy=Tt8JCDmhDePDZA@mail.gmail.com","subject":"Re: [PATCH] doc: Modify git-add doc to say \"staging area\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-12-14T18:50:00Z","receivedAt":"2017-12-14T18:50:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Beller <sbeller@google.com> writes:\n\n> Anyway I think spending list band width on good documentation is\n> not bandwidth wasted.\n\nI agree with that.  I do not consider the proposed change \"good\".\n\n"},{"id":"334824","messageId":"6382776C-175A-4E27-8D7C-385FFF167535@dwheeler.com","threadId":"47436","inReplyTo":"xmqqk1xpta93.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] doc: Modify git-add doc to say \"staging area\"","fromName":"David A. Wheeler","fromEmail":"dwheeler@dwheeler.com","sentAt":"2017-12-14T19:05:21Z","receivedAt":"2017-12-14T19:06:05Z","isPatch":true,"sender":{"key":"dwheeler@dwheeler.com","avatar":"https://avatars.githubusercontent.com/u/813150?v=4"},"body":"On December 14, 2017 1:50:00 PM EST, Junio C Hamano <gitster@pobox.com> wrote:\n>I agree with that.  I do not consider the proposed change \"good\".\n\nWhy is \"index\" better? It is a confusing name, one that has many other unrelated meanings.  In particular, many projects managed by git also have an index, but few have a staging area.\n\nAlso, the phrase \"staging area\" is already in use, so this is not a new term (e.g., git-staging).\n\n\n--- David A.Wheeler\n"},{"id":"334825","messageId":"xmqqfu8dt7wc.fsf@gitster.mtv.corp.google.com","threadId":"47436","inReplyTo":"6382776C-175A-4E27-8D7C-385FFF167535@dwheeler.com","subject":"Re: [PATCH] doc: Modify git-add doc to say \"staging area\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-12-14T19:40:51Z","receivedAt":"2017-12-14T19:40:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"David A. Wheeler\" <dwheeler@dwheeler.com> writes:\n\n> On December 14, 2017 1:50:00 PM EST, Junio C Hamano <gitster@pobox.com> wrote:\n>>I agree with that.  I do not consider the proposed change \"good\".\n>\n> Why is \"index\" better? It is a confusing name, one that has many\n> other unrelated meanings.  In particular, many projects managed by\n> git also have an index, but few have a staging area.\n\nThat's an absurd argument.  A database product that wants to be used\nin library systems are forbidden to have \"index\" because that may be\nconfused with library index cards?\n\n> Also, the phrase \"staging area\" is already in use, so this is not\n> a new term (e.g., git-staging).\n\nThat gets us back to the \"'X acts like Y' is different from 'X is\nY'\".  \n\nBesides, the phrase \"staging area\" is a near-sighted and narrow\nminded term.  It focuses too much on working towards the next\ncommit, and ignores there are other aspects that are equally\nimportant.  When you check out historical revisions (without any\nintention of making new commits, just sightseeing), for example, the\nindex does not act as \"staging area\" for creating a new commit.  But\nit still serves Git users by keeping track of the list of paths that\ncame from the HEAD, and recording their contents and the cached stat\ninfo for the working tree files (all using the pathnames as keys\ninto these data items).\n\n"},{"id":"334826","messageId":"87tvwtayh3.fsf@evledraar.gmail.com","threadId":"47436","inReplyTo":"xmqqk1xpta93.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] doc: Modify git-add doc to say \"staging area\"","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-12-14T19:41:44Z","receivedAt":"2017-12-14T19:41:53Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Dec 14 2017, Junio C. Hamano jotted:\n\n> Stefan Beller <sbeller@google.com> writes:\n>\n>> Anyway I think spending list band width on good documentation is\n>> not bandwidth wasted.\n>\n> I agree with that.  I do not consider the proposed change \"good\".\n\nThe case you're talking about upthread is something which we could\ndescribe in the docs as \"the starting point of the staging area is that\nit's equivalent to the current commit, and is thus used as an\nindex/cache by various commands\", if that ever comes up.\n\nI think in the vast majority of other cases talking about it as the\nstaging area would be an improvement, since that's the function that has\nthe closest correspondence to what the UI is actually doing, that we're\nusing it as a cache / index is usually (always?) an implementation\ndetail.\n\nEven the merge case you mentioned is something where staging area makes\nmore sense: \"We tried to merge, but had a conflict, we've staged some of\nyour changes leaving the rest for you to sort out\".\n"},{"id":"334845","messageId":"CAGZ79kbgbLEOTY9ziWz7gkUFKfpNVsZp5-r-jzd15PQ7iJZsGQ@mail.gmail.com","threadId":"47436","inReplyTo":"E1ePark-0008P4-Qx@rmmprod07.runbox","subject":"Re: [PATCH] doc: Modify git-add doc to say \"staging area\"","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2017-12-14T21:28:59Z","receivedAt":"2017-12-14T21:29:06Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Thu, Dec 14, 2017 at 1:16 PM, David A. Wheeler <dwheeler@dwheeler.com> wrote:\n> \"David A. Wheeler\" <dwheeler@dwheeler.com> writes:\n>> > Why is \"index\" better? It is a confusing name, one that has many\n>> > other unrelated meanings.  In particular, many projects managed by\n>> > git also have an index, but few have a staging area.\n>\n> On Thu, 14 Dec 2017 11:40:51 -0800, Junio C Hamano <gitster@pobox.com> wrote:\n>> That's an absurd argument.  A database product that wants to be used\n>> in library systems are forbidden to have \"index\" because that may be\n>> confused with library index cards?\n>\n> No, because most database systems aren't designed to be primarily used\n> in library systems.  Even if they are, I haven't seen a \"library index card\"\n> in decades (many people will not know what they are), so\n> that is much less likely to be confusing.\n>\n> In contrast, git is widely used to manage source code (where \"index\" often\n> means \"array index\", \"hash index\", and so on) and/or HTML\n> (where \"index.html\" is pretty common).  Using the *same* term for something\n> git often manages *is* confusing.\n>\n> Even if you don't buy that argument, I think most newer users find the term\n> \"staging area\" simpler... and we are *all* new to something at one time.\n>\n> A Google of git \"staging area\" returns 67,000 results, and \"staging area\"\n> is *much* newer terminology than \"index\" and has those hits in *spite* of\n> \"index\" and \"cache\" being the historical terms.\n>\n> Is there a term you'd prefer over \"index\" or \"cache\"?\n>\n\nI would personally prefer to drop 'cache', as the mechanism involved\nis not a cache from the users point of view. (A cache is not affecting\nbehavior except for performance. In Git this \"index\" does affect more\nthan just performance, it also allows a very specific workflow.)\n\nPersonally I am indifferent to whether we call it index or staging\narea as long as it is consistent. Junio mentioned the 'X acts like Y'\nis different from 'X is Y'\", so maybe we can use both words, as in\n\"Use git-add to add files into the index, which is used as a staging\narea for the next commit\".\n\nNote that this discussion seems to be quite old (way older than\nmy contribution record):\n\n    $ git log --grep \"staging area\"\n...\ncommit 11920d28da1ac1b65eb4041c1b7355924e5d1366\nAuthor: Scott Chacon <schacon@gmail.com>\nDate:   2008-12-01 22:14\n\n    Add a built-in alias for 'stage' to the 'add' command\n\n    This comes from conversation at the GitTogether where we thought it would\n    be helpful to be able to teach people to 'stage' files because it tends\n    to cause confusion when told that they have to keep 'add'ing them.\n\n    This continues the movement to start referring to the index as a\n    staging area (eg: the --staged alias to 'git diff'). Also adds a\n    doc file for 'git stage' that basically points to the docs for\n    'git add'.\n\n    Signed-off-by: Scott Chacon <schacon@gmail.com>\n    Signed-off-by: Junio C Hamano <gitster@pobox.com>\n"}]}