[RFC] Case insensitive Git attributes
- From
Lars Schneider <larsxschneider@gmail.com>
- Date
- Oct 17, 2016, 01:04 UTC
- Message-ID
- <C83BE22D-EAC8-49E2-AEE3-22D4A99AE205@gmail.com>
Hi,
Git attributes for path names are generally case sensitive. However, on a case insensitive file system (e.g. macOS/Windows) they appear to be case insensitive (`*.bar` would match `foo.bar` and `foo.BAR`). That works great until a Git users joins the party with a case sensitive file system. For this Git user only files that match the exact case of the attribute pattern get the attributes (only `foo.bar`).
This inconsistent behavior can confuse Git users. An advanced Git user could use a glob pattern (e.g. `*.[bB][aA][rR]) to match files in a case insensitive way. However, this can get confusing quickly, too.
I wonder if we can do something about this. One idea could be to add an attribute "case-sensitive" (or "caseSensitive") and set it to false (if desired) for all files in .gitattributes for a given repo.
### .gitattributes example ###
* case-sensitive=false *.bar something
###
I haven't looked into the feasibility of an implementation, yet. However, would that be an acceptable approach?
Thanks, Lars