Re: [PATCH v2] doc: fix location of index in worktree scenatio
Torsten Bögershausen <tboegi@web.de> writes:
> That's better ... here is my attempt to improve
Show 16 quoted lines
>
> doc: do not use `rm .git/index` when normalizing line endings
>
> When illustrating how to normalize the line endings, the
> documentation in gitattributes tells the user to `rm .git/index`.
>
> This is incorrect for two reasons. Users shouldn't be instructed
> to futz with the internal implementation of Git using raw
> file system tools like "rm".
> Second, when submodules or second working trees are used, ".git"
> is a not a directory but a "gitfile" pointing at the location of the
> real ".git" directory, `rm .git/index` does not work.
>
> The point of the step in the illustration is to remove all
> entries from the index without touching the working tree, and
> the way to do it with Git is to use `read-tree --empty`.