git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] doc: do not use `rm .git/index` when normalizing line endings

From
Torsten Bögershausen <tboegi@web.de>
Date
Jun 14, 2017, 04:06 UTC
Message-ID
<dc2070f9-f76f-d569-69f0-61edb7a80610@web.de>
In-Reply-To
<20170613221506.32732-1-asheiduk@gmail.com>

On 14/06/17 00:15, Andreas Heiduk wrote: Looks good to me, one minor typo below

Show 13 quoted lines
> 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 mess around with the internal
>     implementation of Git using raw file system tools like `rm`.
> 
>   - Within a submodule or an additional working tree `.git` is just a
>     file containing a `gitdir: <path>` pointer into the real `.git`
>     directory.  Therefore `rm .git/index` does not work.
> 
> The purpose or `rm .git/index` instruction is to remove all entries
               ^^
> from the index without touching the working tree.  The way to do this
> with Git is to use `read-tree --empty`.
[]
Previous: Andreas HeidukNext: Andreas Heiduk
Message 11 of 12 in “doc: fix location of index in worktree scenatio”
  1. doc: fix location of index in worktree scenatioAndreas Heiduk, Jun 10, 2017
  2. Junio C HamanoJun 10, 2017
  3. Andreas HeidukJun 10, 2017
  4. doc: fix location of index in worktree scenatioAndreas Heiduk, Jun 10, 2017
  5. Torsten BögershausenJun 12, 2017
  6. Andreas HeidukJun 12, 2017
  7. Junio C HamanoJun 12, 2017
  8. Torsten BögershausenJun 13, 2017
  9. Junio C HamanoJun 13, 2017
  10. doc: do not use `rm .git/index` when normalizing line endingsAndreas Heiduk, Jun 13, 2017
  11. Torsten BögershausenJun 14, 2017
  12. doc: do not use `rm .git/index` when normalizing line endingsAndreas Heiduk, Jun 14, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.