# Question on case insensitive systems.

2 messages from 2020-03-13 to 2020-03-13. Participants: Paweł Redzyński, Torsten Bögershausen.
Thread: https://gitlist.dev/t/52987

## Paweł Redzyński, 2020-03-13 12:05

Subject: Question on case insensitive systems.
Message-ID: <CAOTQ0KvpO5iVFsMqz5WPZd8uEd9_SRxQvznvEEB05jnTTWXBBg@mail.gmail.com>
URL: https://gitlist.dev/e/CAOTQ0KvpO5iVFsMqz5WPZd8uEd9_SRxQvznvEEB05jnTTWXBBg%40mail.gmail.com

```
Hello,
I noticed that check for filename collision on case insensitive
systems happen only upon clone:
https://github.com/git/git/blob/c522f061d551c9bb8684a7c3859b2ece4499b56b/entry.c#L499
and
https://github.com/git/git/blob/c522f061d551c9bb8684a7c3859b2ece4499b56b/unpack-trees.c#L445

 What if collision exists on some commit that is checked out only after clone?

Is this behavior intentional (eg. for performance reasons)? If its a
bug, can I volunteer to solve it?
Best regards
Paweł

```

## Torsten Bögershausen, 2020-03-13 15:22

Subject: Re: Question on case insensitive systems.
Message-ID: <20200313152223.4glbokvfcmexrx4n@tb-raspi4>
URL: https://gitlist.dev/e/20200313152223.4glbokvfcmexrx4n%40tb-raspi4
In-Reply-To: <CAOTQ0KvpO5iVFsMqz5WPZd8uEd9_SRxQvznvEEB05jnTTWXBBg@mail.gmail.com>

```
On Fri, Mar 13, 2020 at 01:05:46PM +0100, Paweł Redzyński wrote:
> Hello,
> I noticed that check for filename collision on case insensitive
> systems happen only upon clone:
> https://github.com/git/git/blob/c522f061d551c9bb8684a7c3859b2ece4499b56b/entry.c#L499
> and
> https://github.com/git/git/blob/c522f061d551c9bb8684a7c3859b2ece4499b56b/unpack-trees.c#L445
>
>  What if collision exists on some commit that is checked out only after clone?

The OS will overwrite e.g. the content of "FILE.TXT" with "file.txt" if
both exist in the repo.
(Or the other way around)
As a result, "FILE.TXT" would have the contents of "file.txt" which is
typically different, and Git will report "FILE.TXT" as "modified".

>
> Is this behavior intentional (eg. for performance reasons)?

That depends on the definition of "performance".
The Git-developpers have not yet implemented a better solution,
since most of them do such things in their spare time.

As a consequence, we haven't been able to measure the performance
on a computer running Git.

>If its a bug, can I volunteer to solve it?

I would call it a feature, worth to be implemented.
And of course, you are wellcome to solve it.
I (and probably many others) are happy to help with code-reviews
and other tips, hints, suggestions.

> Best regards
> Paweł

```
