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

Re: [RFC] Case insensitive Git attributes

From
Duy Nguyen <pclouds@gmail.com>
Date
Oct 17, 2016, 11:02 UTC
Message-ID
<CACsJy8ASnvryrrWvr4ACWL_9oeKgE_4SUqcRHGf+Y6kcaeDUhg@mail.gmail.com>
In-Reply-To
<alpine.DEB.2.20.1610171241240.197091@virtualbox>

On Mon, Oct 17, 2016 at 5:46 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

Show 37 quoted lines
> Hi Duy,
>
> On Mon, 17 Oct 2016, Duy Nguyen wrote:
>
>> On Mon, Oct 17, 2016 at 3:57 PM, Johannes Schindelin
>> <Johannes.Schindelin@gmx.de> wrote:
>> > Hi Stefan,
>> >
>> > On Sun, 16 Oct 2016, Stefan Beller wrote:
>> >
>> >> Conceptually I would prefer if we had a single switch that indicates a
>> >> case insensitive FS.
>> >
>> > AFAIU Lars' use case is where the FS is *case sensitive*, but he still
>> > needs the .gitattributes to be *case insensitive* because that file
>> > originates from a developer with such a file system.
>> >
>> > Otherwise he would simply tack onto the core.ignoreCase flag.
>>
>> That sounds to me like setting core.ignoreCase to true (on all devs'
>> repo) would "solve" this.
>
> It is good that you quoted this verb, because it does not solve things.
> Instead, it would try to use the flag for two slightly incompatible
> purposes at the same time.
>
> The first (and so far, only) purpose is to tell Git that the current file
> system is case insensitive.
>
> The new purpose you described would be to tell Git that the *user* does
> not care about the file names' case, even if the file system does.
>
> I do not think that this leads to a better situation than before. Instead,
> I am convinced that it will cause new and sometimes "entertaining"
> problems because you can no longer discern between those two purposes
> based on core.ignoreCase, you would have to teach Git to test every single
> time whether the file system is case-sensitive or not.

I agree. Which is why I wrote "we probably want something in the same spirit but limited to .gitattributes and .gitignore only". In other words we could have core.someName that makes .gitattributes and .gitignore patterns case-insensitive (or core-sensitive). If it's present, it overrides core.ignoreCase. If it's not present, core.ignoreCase decides. I'm just not sure if the new config should cover everything involving filename's case in git. That's too big to fit in my head.

> Needless to say, I'd rather not see that happening. Many users, including
> my colleagues and myself, rely on Git being a rock solid piece of
> software, and that change would make it less so.
-- 
Duy
Previous: Johannes SchindelinNext: Junio C Hamano
Message 7 of 9 in “[RFC] Case insensitive Git attributes”
  1. Lars SchneiderOct 17, 2016
  2. Stefan BellerOct 17, 2016
  3. Torsten BögershausenOct 17, 2016
  4. Johannes SchindelinOct 17, 2016
  5. Duy NguyenOct 17, 2016
  6. Johannes SchindelinOct 17, 2016
  7. Duy NguyenOct 17, 2016
  8. Junio C HamanoOct 17, 2016
  9. Johannes SchindelinOct 17, 2016

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.