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

Re: BUG FOLLOWUP: Case insensitivity in worktrees

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 24, 2020, 19:36 UTC
Message-ID
<xmqq7dusn1su.fsf@gitster.c.googlers.com>
In-Reply-To
<02819EF1-CCA7-4A0F-9497-F6A52E6CBF30@strongestfamilies.com>
Casey Meijer <cmeijer@strongestfamilies.com> writes:
Show 9 quoted lines
> Sorry I got mixed up,, that last message should have been
> addressed to Junio.
>
> My apologies. 
>
> To put it very simply, I'm asking that git respect the separation
> of concerns between itself and its storage engine (regardless of
> whether that's pluggable, or just the current filesystem, which I
> guess is technically pluggable, lol).

If "git" is told to store ref 'foo' pointing at object X and then ref 'Foo' pointing at object Y by the end user, after claiming to have done these two operations, if it is then asked about the value of 'foo', it must say that 'foo' points at object X and not Y. If a ref backend is based on case insensitive filesystem, there are only two options available. (1) ignore case and violate the expectation of end user. (2) come up with a way to "defeat" the limitation of case insensitivity imposed by the filesystem (e.g. your ref backend implementation _could_ URLencode/decode the ref before using it as a filename on such a filesystem).

Doing (2) would be transparent to the rest of Git (i.e. the rest of Git does not have to care that each ref is stored in a file, whose filename is encoded version of the refname) and gives us a good separation of concerns between it and the storage backend. Those who ported Git to case insensitive filesystems didn't and chose (1).

As (1) violates end-user expectation, I would think it is fair to declare it a bug.

Previous: Casey MeijerNext: Casey Meijer
Message 6 of 8 in “Re: BUG FOLLOWUP: Case insensitivity in worktrees”
  1. Casey MeijerJul 23, 2020
  2. brian m. carlsonJul 24, 2020
  3. Junio C HamanoJul 24, 2020
  4. Casey MeijerJul 24, 2020
  5. Casey MeijerJul 24, 2020
  6. Junio C HamanoJul 24, 2020
  7. Casey MeijerJul 24, 2020
  8. brian m. carlsonJul 24, 2020

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.