{"thread":{"id":"46153","subject":"[PATCH] doc: fix location of index in worktree scenatio","startedAt":"2017-06-10T09:07:56Z","lastAt":"2017-06-14T06:52:02Z","messageCount":12,"participants":["Andreas Heiduk","Junio C Hamano","Torsten Bögershausen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"321901","messageId":"20170610090719.8429-1-asheiduk@gmail.com","threadId":"46153","inReplyTo":null,"subject":"[PATCH] doc: fix location of index in worktree scenatio","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-06-10T09:07:19Z","receivedAt":"2017-06-10T09:07:56Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"When setting `.gitattributes` in a second worktree, a plain `rm .git/index`\ndoes not actually delete the index.\n\nSigned-off-by: Andreas Heiduk <asheiduk@gmail.com>\n---\n Documentation/gitattributes.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt\nindex 473648386..4c6b74fa6 100644\n--- a/Documentation/gitattributes.txt\n+++ b/Documentation/gitattributes.txt\n@@ -229,7 +229,7 @@ From a clean working directory:\n \n -------------------------------------------------\n $ echo \"* text=auto\" >.gitattributes\n-$ rm .git/index     # Remove the index to re-scan the working directory\n+$ rm \"$(git rev-parse --git-path index)\"  # Remove the index to re-scan the working directory\n $ git add .\n $ git status        # Show files that will be normalized\n $ git commit -m \"Introduce end-of-line normalization\"\n-- \n2.13.0\n\n"},{"id":"321913","messageId":"xmqqmv9g1487.fsf@gitster.mtv.corp.google.com","threadId":"46153","inReplyTo":"20170610090719.8429-1-asheiduk@gmail.com","subject":"Re: [PATCH] doc: fix location of index in worktree scenatio","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-06-10T11:17:44Z","receivedAt":"2017-06-10T11:17:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Heiduk <asheiduk@gmail.com> writes:\n\n> When setting `.gitattributes` in a second worktree, a plain `rm .git/index`\n> does not actually delete the index.\n>\n> Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>\n> ---\n>  Documentation/gitattributes.txt | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n\nRight.  \n\nI however have to wonder if we can do the same without futzing\ndirectly with the \"index\" file as a filesystem entity.  With or\nwithout your update, what is taught in the document feels like\nmunging a disk block with binary editor to correct a corrupted\nfilesystem X-<.\n\nFor example, can we do this \"empty the index\" step with things like\n\n    $ git rm --cached .\n\nor\n\n    $ git read-tree --empty\n\ninstead?\n\nThanks.\n\n> diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt\n> index 473648386..4c6b74fa6 100644\n> --- a/Documentation/gitattributes.txt\n> +++ b/Documentation/gitattributes.txt\n> @@ -229,7 +229,7 @@ From a clean working directory:\n>  \n>  -------------------------------------------------\n>  $ echo \"* text=auto\" >.gitattributes\n> -$ rm .git/index     # Remove the index to re-scan the working directory\n> +$ rm \"$(git rev-parse --git-path index)\"  # Remove the index to re-scan the working directory\n>  $ git add .\n>  $ git status        # Show files that will be normalized\n>  $ git commit -m \"Introduce end-of-line normalization\"\n"},{"id":"321929","messageId":"d2b21102-eb32-7061-14ee-aa8906fe9eeb@gmail.com","threadId":"46153","inReplyTo":"xmqqmv9g1487.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] doc: fix location of index in worktree scenatio","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-06-10T17:24:51Z","receivedAt":"2017-06-10T17:25:00Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"Am 10.06.2017 um 13:17 schrieb Junio C Hamano:\n> Andreas Heiduk <asheiduk@gmail.com> writes:\n> \n>> When setting `.gitattributes` in a second worktree, a plain `rm .git/index`\n>> does not actually delete the index.\n>>\n[...]\n> Right.  \n> \n> I however have to wonder if we can do the same without futzing\n> directly with the \"index\" file as a filesystem entity.  With or\n> without your update, what is taught in the document feels like\n> munging a disk block with binary editor to correct a corrupted\n> filesystem X-<.\n\nIMO `rm .git/index` is like munging a disk block WITHOUT a binary\neditor but with plain `dd seek=... skip=... count=...`, `hexdump`,\n`ed` and back - every step is clear in principle but painful and\ndangerous. :-)\n\n> For example, can we do this \"empty the index\" step with things like\n> \n>     $ git rm --cached .\n\nThat would be `git rm --cached -rq .`?\n\nExecuting this in the git repo gives me an index file with 2.1kb. I\ndon't know whether or not this index still contains something relevant\nfor this case.\n\n> or\n> \n>     $ git read-tree --empty\n> \n> instead?\n\nNice! The `index` file contains 46 bytes.\n\nFor me THAT one is like a nice binary editor apt for the job :-)\nI'll queue that.\n"},{"id":"321930","messageId":"20170610173824.19460-1-asheiduk@gmail.com","threadId":"46153","inReplyTo":"20170610090719.8429-1-asheiduk@gmail.com","subject":"[PATCH v2] doc: fix location of index in worktree scenatio","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-06-10T17:38:24Z","receivedAt":"2017-06-10T17:38:42Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"When setting `.gitattributes` in a second worktree, a plain `rm .git/index`\ndoes not actually delete the index.\n\nSigned-off-by: Andreas Heiduk <asheiduk@gmail.com>\nHelped-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/gitattributes.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt\nindex 473648386..2a2d7e2a4 100644\n--- a/Documentation/gitattributes.txt\n+++ b/Documentation/gitattributes.txt\n@@ -229,7 +229,7 @@ From a clean working directory:\n \n -------------------------------------------------\n $ echo \"* text=auto\" >.gitattributes\n-$ rm .git/index     # Remove the index to re-scan the working directory\n+$ git read-tree --empty   # Clean index, force re-scan of working directory\n $ git add .\n $ git status        # Show files that will be normalized\n $ git commit -m \"Introduce end-of-line normalization\"\n-- \n2.13.0\n\n"},{"id":"321953","messageId":"b4906d3f-7e4d-f4dc-dc39-7eac5da8292d@web.de","threadId":"46153","inReplyTo":"20170610173824.19460-1-asheiduk@gmail.com","subject":"Re: [PATCH v2] doc: fix location of index in worktree scenatio","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2017-06-12T10:03:11Z","receivedAt":"2017-06-12T10:02:50Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"Thanks for working on this (and keeping me in cc)\n\nThe commit head line does not fully match my expactions:\n\"doc: fix location of index in worktree scenatio\"\n\"doc:\" is OK, but is the \"location of index\" fixed ?\nActually something that includes the important stuff:\n\n\"doc\"\n\"fix\"\n\"normalize the line endings\"\n\"worktree scenatio\"\n\ncould be more helpful.\n\nHow about this as a header for the commit:\n\"doc: normalize the line endings in a worktree scenatio\"\n\n\n\n\n\n\n\nOn 10/06/17 19:38, Andreas Heiduk wrote:\n> When setting `.gitattributes` in a second worktree, a plain `rm .git/index`\n> does not actually delete the index.\nThis feels somewhat short. setting .gitattributes is (in general) independent \nof the index.\nIn normalizing line endings case the user needs to do both, fix attribiutes, \nand re-read the work tree, discarding the index.\n\nHow about this:\n\nWhen line endings are normalized in a second worktree, a plain `rm .git/index`\ndoes not actually delete the index.\nFix a long standing bug in the documentaton and use \"git read-tree --empty\" \ninstead-\n\n\n\n\n\n> \n> Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>\n> Helped-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>   Documentation/gitattributes.txt | 2 +-\n>   1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt\n> index 473648386..2a2d7e2a4 100644\n> --- a/Documentation/gitattributes.txt\n> +++ b/Documentation/gitattributes.txt\n> @@ -229,7 +229,7 @@ From a clean working directory:\n>   \n>   -------------------------------------------------\n>   $ echo \"* text=auto\" >.gitattributes\n> -$ rm .git/index     # Remove the index to re-scan the working directory\n> +$ git read-tree --empty   # Clean index, force re-scan of working directory\n>   $ git add .\n>   $ git status        # Show files that will be normalized\n>   $ git commit -m \"Introduce end-of-line normalization\"\n> \n"},{"id":"321954","messageId":"942bca59-40d4-bfbd-a3e7-a15d399780e3@gmail.com","threadId":"46153","inReplyTo":"b4906d3f-7e4d-f4dc-dc39-7eac5da8292d@web.de","subject":"Re: [PATCH v2] doc: fix location of index in worktree scenatio","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-06-12T10:48:42Z","receivedAt":"2017-06-12T10:48:51Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"Am 12.06.2017 um 12:03 schrieb Torsten Bögershausen:\n> Thanks for working on this (and keeping me in cc)\n> \n> The commit head line does not fully match my expactions:\n> \"doc: fix location of index in worktree scenatio\"\n> \"doc:\" is OK, but is the \"location of index\" fixed ?\n> Actually something that includes the important stuff:\n> \n> \"doc\"\n> \"fix\"\n> \"normalize the line endings\"\n> \"worktree scenatio\"\n> \n> could be more helpful.\n> \n> How about this as a header for the commit:\n> \"doc: normalize the line endings in a worktree scenatio\"\n\nWell, my patch does not document nor enhance the documentation\nabout EOL normalization per se.\n\n\n> On 10/06/17 19:38, Andreas Heiduk wrote:\n>> When setting `.gitattributes` in a second worktree, a plain `rm\n>> .git/index`\n>> does not actually delete the index.\n> This feels somewhat short. setting .gitattributes is (in general)\n> independent of the index.\n> In normalizing line endings case the user needs to do both, fix\n> attribiutes, and re-read the work tree, discarding the index.\n> \n> How about this:\n> \n> When line endings are normalized in a second worktree, a plain `rm\n> .git/index`\n> does not actually delete the index.\n> Fix a long standing bug in the documentaton and use \"git read-tree\n> --empty\" instead-\n\nBefore `git worktree` the description was correct. So what about this\nsubject and body:\n\n----\ndoc: fix location of index while normalizing EOLs\n\nWhen line endings are normalized in a second worktree, a plain\n`rm .git/index` does not actually delete the index. Fix the\ndocumentation by using `git read-tree --empty` instead.\n----\n"},{"id":"321960","messageId":"xmqqfuf5p4wk.fsf@gitster.mtv.corp.google.com","threadId":"46153","inReplyTo":"b4906d3f-7e4d-f4dc-dc39-7eac5da8292d@web.de","subject":"Re: [PATCH v2] doc: fix location of index in worktree scenatio","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-06-12T16:06:03Z","receivedAt":"2017-06-12T16:06:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Torsten Bögershausen <tboegi@web.de> writes:\n\n> Thanks for working on this (and keeping me in cc)\n>\n> The commit head line does not fully match my expactions:\n> \"doc: fix location of index in worktree scenatio\"\n> \"doc:\" is OK, but is the \"location of index\" fixed ?\n> Actually something that includes the important stuff:\n>\n> \"doc\"\n> \"fix\"\n> \"normalize the line endings\"\n> \"worktree scenatio\"\n>\n> could be more helpful.\n>\n> How about this as a header for the commit:\n> \"doc: normalize the line endings in a worktree scenatio\"\n\nAndreas's patch does not \"normalize\" anything, though.\n\n    doc: do not encourage `rm .git/index` in an example\n\n    When illustrating how to force normalizing the line endings,\n    gitattributes documentation tells the user to `rm .git/index`.\n\n    This is incorrect for two reasons.  We shouldn't be encouraging\n    users to futz with the internal implementation of Git using raw\n    filesystem tools like \"rm\" too much.  Also, when \".git\" is not a\n    directory but a \"gitfile\" pointing at the real location of the\n    real \".git\" directory, `rm .git/index` would not work anyway.\n\n    The point of the step in the illustration is to remove all\n    entries from the index without touching the working tree, and\n    the way to do it with Git is to use `read-tree --empty`.\n\nperhaps?\n\nYou _could_ mention \"worktree scenario\" but that is not the sole\nuser of the gitfile facility (e.g. a submodule working tree also\nuses \".git\" that is a gitfile pointing at the real repository\nlocation), and \"worktree\" is not the real root cause of the problem\n(\"gitfile\" is), so I do not think it is essential to do so.  If we\nreally want to, we can add to the second from the paragraph\nsomething like this:\n\n    ... would not work anyway (the use of \".git\" that is \"gitfile\"\n    is often seen in a secondary working tree managed by \"git\n    worktree\" and in a working tree of a submodule).\n\n"},{"id":"322046","messageId":"04ad4189-8575-2f0f-2c99-c98672513293@web.de","threadId":"46153","inReplyTo":"xmqqfuf5p4wk.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v2] doc: fix location of index in worktree scenatio","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2017-06-13T04:29:09Z","receivedAt":"2017-06-13T04:29:27Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 06/12/2017 06:06 PM, Junio C Hamano wrote:\n> Torsten Bögershausen <tboegi@web.de> writes:\n>\n>> Thanks for working on this (and keeping me in cc)\n>>\n>> The commit head line does not fully match my expactions:\n>> \"doc: fix location of index in worktree scenatio\"\n>> \"doc:\" is OK, but is the \"location of index\" fixed ?\n>> Actually something that includes the important stuff:\n>>\n>> \"doc\"\n>> \"fix\"\n>> \"normalize the line endings\"\n>> \"worktree scenatio\"\n>>\n>> could be more helpful.\n>>\n>> How about this as a header for the commit:\n>> \"doc: normalize the line endings in a worktree scenatio\"\n> Andreas's patch does not \"normalize\" anything, though.\n>\n>      doc: do not encourage `rm .git/index` in an example\n>\n>      When illustrating how to force normalizing the line endings,\n>      gitattributes documentation tells the user to `rm .git/index`.\n>\n>      This is incorrect for two reasons.  We shouldn't be encouraging\n>      users to futz with the internal implementation of Git using raw\n>      filesystem tools like \"rm\" too much.  Also, when \".git\" is not a\n>      directory but a \"gitfile\" pointing at the real location of the\n>      real \".git\" directory, `rm .git/index` would not work anyway.\n>\n>      The point of the step in the illustration is to remove all\n>      entries from the index without touching the working tree, and\n>      the way to do it with Git is to use `read-tree --empty`.\n>\n> perhaps?\n>\n> You _could_ mention \"worktree scenario\" but that is not the sole\n> user of the gitfile facility (e.g. a submodule working tree also\n> uses \".git\" that is a gitfile pointing at the real repository\n> location), and \"worktree\" is not the real root cause of the problem\n> (\"gitfile\" is), so I do not think it is essential to do so.  If we\n> really want to, we can add to the second from the paragraph\n> something like this:\n>\n>      ... would not work anyway (the use of \".git\" that is \"gitfile\"\n>      is often seen in a secondary working tree managed by \"git\n>      worktree\" and in a working tree of a submodule).\n>\nThat's better ... here is my attempt to improve\n\n\ndoc: do not use `rm .git/index` when normalizing line endings\n\n     When illustrating how to normalize the line endings, the\n     documentation in gitattributes tells the user to `rm .git/index`.\n\n     This is incorrect for two reasons.  Users shouldn't be instructed\n     to futz with the internal implementation of Git using raw\n     file system tools like \"rm\".\n     Second, when submodules or second working trees are used, \".git\"\n     is a not a directory but a \"gitfile\" pointing at the location of the\n     real \".git\" directory, `rm .git/index` does not work.\n\n     The point of the step in the illustration is to remove all\n     entries from the index without touching the working tree, and\n     the way to do it with Git is to use `read-tree --empty`.\n\n\n"},{"id":"322087","messageId":"xmqqzidc829r.fsf@gitster.mtv.corp.google.com","threadId":"46153","inReplyTo":"04ad4189-8575-2f0f-2c99-c98672513293@web.de","subject":"Re: [PATCH v2] doc: fix location of index in worktree scenatio","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-06-13T13:07:12Z","receivedAt":"2017-06-13T13:07:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Torsten Bögershausen <tboegi@web.de> writes:\n\n> That's better ... here is my attempt to improve\n\nThat reads well.  Thanks.\n\n>\n> doc: do not use `rm .git/index` when normalizing line endings\n>\n>     When illustrating how to normalize the line endings, the\n>     documentation in gitattributes tells the user to `rm .git/index`.\n>\n>     This is incorrect for two reasons.  Users shouldn't be instructed\n>     to futz with the internal implementation of Git using raw\n>     file system tools like \"rm\".\n>     Second, when submodules or second working trees are used, \".git\"\n>     is a not a directory but a \"gitfile\" pointing at the location of the\n>     real \".git\" directory, `rm .git/index` does not work.\n>\n>     The point of the step in the illustration is to remove all\n>     entries from the index without touching the working tree, and\n>     the way to do it with Git is to use `read-tree --empty`.\n"},{"id":"322164","messageId":"20170613221506.32732-1-asheiduk@gmail.com","threadId":"46153","inReplyTo":"20170610090719.8429-1-asheiduk@gmail.com","subject":"[PATCH v3] doc: do not use `rm .git/index` when normalizing line endings","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-06-13T22:15:06Z","receivedAt":"2017-06-13T22:16:03Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"When illustrating how to normalize the line endings, the\ndocumentation in gitattributes tells the user to `rm .git/index`.\n\nThis is incorrect for two reasons:\n\n - Users shouldn't be instructed to mess around with the internal\n   implementation of Git using raw file system tools like `rm`.\n\n - Within a submodule or an additional working tree `.git` is just a\n   file containing a `gitdir: <path>` pointer into the real `.git`\n   directory.  Therefore `rm .git/index` does not work.\n\nThe purpose or `rm .git/index` instruction is to remove all entries\nfrom the index without touching the working tree.  The way to do this\nwith Git is to use `read-tree --empty`.\n\nSigned-off-by: Andreas Heiduk <asheiduk@gmail.com>\nHelped-by: Junio C Hamano <gitster@pobox.com>\nHelped-by: Torsten Bögershausen <tboegi@web.de>\n---\n Documentation/gitattributes.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt\nindex 473648386..2a2d7e2a4 100644\n--- a/Documentation/gitattributes.txt\n+++ b/Documentation/gitattributes.txt\n@@ -229,7 +229,7 @@ From a clean working directory:\n \n -------------------------------------------------\n $ echo \"* text=auto\" >.gitattributes\n-$ rm .git/index     # Remove the index to re-scan the working directory\n+$ git read-tree --empty   # Clean index, force re-scan of working directory\n $ git add .\n $ git status        # Show files that will be normalized\n $ git commit -m \"Introduce end-of-line normalization\"\n-- \n2.13.0\n\n"},{"id":"322185","messageId":"dc2070f9-f76f-d569-69f0-61edb7a80610@web.de","threadId":"46153","inReplyTo":"20170613221506.32732-1-asheiduk@gmail.com","subject":"Re: [PATCH v3] doc: do not use `rm .git/index` when normalizing line endings","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2017-06-14T04:06:49Z","receivedAt":"2017-06-14T04:06:15Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"\n\nOn 14/06/17 00:15, Andreas Heiduk wrote:\nLooks good to me, one minor typo below\n\n> When illustrating how to normalize the line endings, the\n> documentation in gitattributes tells the user to `rm .git/index`.\n> \n> This is incorrect for two reasons:\n> \n>   - Users shouldn't be instructed to mess around with the internal\n>     implementation of Git using raw file system tools like `rm`.\n> \n>   - Within a submodule or an additional working tree `.git` is just a\n>     file containing a `gitdir: <path>` pointer into the real `.git`\n>     directory.  Therefore `rm .git/index` does not work.\n> \n> The purpose or `rm .git/index` instruction is to remove all entries\n               ^^\n> from the index without touching the working tree.  The way to do this\n> with Git is to use `read-tree --empty`.\n[]\n"},{"id":"322197","messageId":"20170614065139.10825-1-asheiduk@gmail.com","threadId":"46153","inReplyTo":"20170613221506.32732-1-asheiduk@gmail.com","subject":"[PATCH v4] doc: do not use `rm .git/index` when normalizing line endings","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-06-14T06:51:39Z","receivedAt":"2017-06-14T06:52:02Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"When illustrating how to normalize the line endings, the\ndocumentation in gitattributes tells the user to `rm .git/index`.\n\nThis is incorrect for two reasons:\n\n - Users shouldn't be instructed to mess around with the internal\n   implementation of Git using raw file system tools like `rm`.\n\n - Within a submodule or an additional working tree `.git` is just a\n   file containing a `gitdir: <path>` pointer into the real `.git`\n   directory.  Therefore `rm .git/index` does not work.\n\nThe purpose of the `rm .git/index` instruction is to remove all entries\nfrom the index without touching the working tree.  The way to do this\nwith Git is to use `read-tree --empty`.\n\nSigned-off-by: Andreas Heiduk <asheiduk@gmail.com>\nHelped-by: Junio C Hamano <gitster@pobox.com>\nHelped-by: Torsten Bögershausen <tboegi@web.de>\n---\n Documentation/gitattributes.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt\nindex 473648386..2a2d7e2a4 100644\n--- a/Documentation/gitattributes.txt\n+++ b/Documentation/gitattributes.txt\n@@ -229,7 +229,7 @@ From a clean working directory:\n \n -------------------------------------------------\n $ echo \"* text=auto\" >.gitattributes\n-$ rm .git/index     # Remove the index to re-scan the working directory\n+$ git read-tree --empty   # Clean index, force re-scan of working directory\n $ git add .\n $ git status        # Show files that will be normalized\n $ git commit -m \"Introduce end-of-line normalization\"\n-- \n2.13.0\n\n"}]}