this post was submitted on 24 Dec 2024
436 points (95.4% liked)

Programmer Humor

19829 readers
646 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 16 points 2 days ago (2 children)

The issue isn't just a simple oversight. Git includes the file name as part of the tree and commit hash. The hash has security implications. There's really no way to make the hash support case insensitivity without opening up a multitude of holes there. So there will always be a mismatch, and you can't just fix it without changing how git works from the ground up.

[–] [email protected] 8 points 2 days ago* (last edited 2 days ago) (1 children)

Of course you can, make it lowercase internally and store the case formatted string for output.

[–] [email protected] 9 points 2 days ago (1 children)

That'd break git repos where files with the same name, but different case exist.

[–] [email protected] -2 points 2 days ago* (last edited 2 days ago)

I was talking about branch names, not file names. File duplicates due to case sensitivity aren't a problem on Windows anyway because those are already enforced by the file system. Unless you have people working on Linux that have multiple files with a similar name but with different casing but those should know better.

[–] [email protected] 0 points 2 days ago