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

Re: [PATCH] apply: support case-only renames in case-insensitive filesystems

From
Tao Klerks <tao@klerks.biz>
Date
Jun 15, 2022, 11:24 UTC
Message-ID
<CAPMMpohZbcK1a8T+eoTdG2wjaOvLun1E0QZEEVv6QTxhHb8r5w@mail.gmail.com>
In-Reply-To
<CAPMMpogcm36pd7fjvG64G7Vg29arukF-wzOKYbNYG9NOpVCXvQ@mail.gmail.com>
On Tue, Jun 14, 2022 at 8:22 AM Tao Klerks <tao@klerks.biz> wrote:
>
>
> New patch coming.
>

Quick update on this - while exploring test scenarios I found an edge-case where these changes *seem* to introduce a regression. The probably-problematic behavior is that if there is a differing-in-case-only (case-insensitive duplicate) file (with different content) in the index, but obviously not on the filesystem as the case-insensitive filesystem can't allow both files to exist, the "git apply --index" of a case-only rename from the original filename to the "duplicate" filename will replace that duplicate file in the index, replacing its original content. With these changes, the rename of a file can, under very specific circumstances, cause a "rename" patch to replace/delete unrelated data in a staged-only (and maybe also committed) file.

I need to do more testing to understand the relationship between this behavior and similar scenarios in, for example, git checkout.

The current patch can be found at https://github.com/gitgitgadget/git/pull/1257, but I'm not sure when I'll have time to investigate further, settle whether this is a (meaningful) regression or not, think about how to address it if so, and submit a v2 :(

Previous: Tao KlerksNext: Tao Klerks
Message 5 of 21 in “apply: support case-only renames in case-insensitive filesystems”
  1. apply: support case-only renames in case-insensitive filesystemsTao Klerks via GitGitGadget, Jun 11, 2022
  2. Junio C HamanoJun 11, 2022
  3. Junio C HamanoJun 12, 2022
  4. Tao KlerksJun 14, 2022
  5. Tao KlerksJun 15, 2022
  6. Tao KlerksJun 14, 2022
  7. Junio C HamanoJun 18, 2022
  8. Tao KlerksJun 18, 2022
  9. Junio C HamanoJun 12, 2022
  10. Junio C HamanoJun 13, 2022
  11. Tao KlerksJun 14, 2022
  12. Tao KlerksJun 14, 2022
  13. 0/3 RFC: apply: support case-only renames in case-insensitive filesystemsTao Klerks via GitGitGadget, Jun 19, 2022
  14. 2/3 reset: new failing test for reset of case-insensitive duplicate in indexTao Klerks via GitGitGadget, Jun 19, 2022
  15. 1/3 t4141: test "git apply" with core.ignorecaseJunio C Hamano via GitGitGadget, Jun 19, 2022
  16. 3/3 apply: support case-only renames in case-insensitive filesystemsTao Klerks via GitGitGadget, Jun 19, 2022
  17. Tao KlerksOct 10, 2022
  18. 0/3 apply: support case-only renames in case-insensitive filesystemsTao Klerks via GitGitGadget, May 28, 2023
  19. 2/3 reset: new failing test for reset of case-insensitive duplicate in indexTao Klerks via GitGitGadget, May 28, 2023
  20. 1/3 t4142: test "git apply" with core.ignorecaseJunio C Hamano via GitGitGadget, May 28, 2023
  21. 3/3 apply: support case-only renames in case-insensitive filesystemsTao Klerks via GitGitGadget, May 28, 2023

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.