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

Re: [PATCH v3 1/1] abspath_part_inside_repo: respect core.fileMode

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 25, 2018, 08:46 UTC
Message-ID
<xmqqa7kuat8j.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<xmqqftumb8zv.fsf@gitster-ct.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 6 quoted lines
> the resulting index entry is "blub" or "BLUB".  Shouldn't we verify
> that "git add" adds an expected path to the index, instead of
> blindly trusting that it says "Yeah, I did as I was told" with its
> exit status?  Would we be adding 'blub' as that is what we told
> 'git' to add, or would it be 'BLUB' as that is what exists on the
> filesystem that is case insensitive but case preserving?

Needless to say, the last part of the above is a mere thetorical question, and I am not questioning the established behaviour or suggesting to "improve" it. On a case insensitive filesystem, we trust what readdir() gave us (but match them with pathspec case insensitively) for a new path that is not in the index. When we update the contents of a path that is already in the index, we preserve the case in the index, even when readdir() reports the same path in different case (iow, we trust the case in the index more than what readdir() gives us)..

What I am wondering in the above is if we should document that in the test, perhaps with a simple

	git ls-files blub >actual &&
	echo BLUB >expect &&
	test_cmp expect actual
or something like that.
Previous: Junio C HamanoNext: Johannes Schindelin
Message 12 of 15 in “Make abspath() aware of case-insensitive filesystems”
  1. 0/1 Make abspath() aware of case-insensitive filesystemsJohannes Schindelin via GitGitGadget, Dec 21, 2018
  2. 1/1 abspath_part_inside_repo: respect core.fileModeJohannes Schindelin via GitGitGadget, Dec 21, 2018
  3. Carlo ArenasDec 22, 2018
  4. Johannes SchindelinDec 24, 2018
  5. 0/1 Make abspath() aware of case-insensitive filesystemsJohannes Schindelin via GitGitGadget, Dec 24, 2018
  6. 1/1 abspath_part_inside_repo: respect core.fileModeJohannes Schindelin via GitGitGadget, Dec 24, 2018
  7. Torsten BögershausenDec 25, 2018
  8. Johannes SchindelinJan 18, 2019
  9. 0/1 Make abspath() aware of case-insensitive filesystemsJohannes Schindelin via GitGitGadget, Dec 24, 2018
  10. 1/1 abspath_part_inside_repo: respect core.fileModeJohannes Schindelin via GitGitGadget, Dec 24, 2018
  11. Junio C HamanoDec 25, 2018
  12. Junio C HamanoDec 25, 2018
  13. Johannes SchindelinJan 18, 2019
  14. 0/1 Make abspath() aware of case-insensitive filesystemsJohannes Schindelin via GitGitGadget, Jan 18, 2019
  15. 1/1 abspath_part_inside_repo: respect core.ignoreCaseJohannes Schindelin via GitGitGadget, Jan 18, 2019

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.