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

Git case-sensitivity bug

From
CCliff <miliways@gmail.com>
Date
May 10, 2018, 19:46 UTC
Message-ID
<CAKsGxtUpu66fj=puTxioTwCrint+U83a3R-DPhx5gXKF8Phm3A@mail.gmail.com>
I believe I have discovered a bug with git tools.

If you create a git branch, you can refer to that branch with case-insensitive alterations and it will track as the same branch.

If I create branch "test" I cannot then create branch "Test" because the same name is already used.

However, git commands ARE case-sensitive, causing unspecified behavior!

If you create branch "test" and then run "git checkout Test" and then run "git branch" it will list the branches "master" and "test" and NEITHER ONE will be flagged * as the current branch! (It does not list Test and does not show any branch as being the current branch)

As far as git is concerned... you're not on a branch! But you're secretly on the "test" branch.

Also, I think this may cause further issues. Switching to "test" tells me that I am 1 commit behind master, but switching to "Test" gives no such message, and appears to want me to --set-upstream again, for the same branch.

This is really bad behavior.
I'm on MacOS so this may be unique to the Mac version of git tools.
Next: Bryan Turner
Message 1 of 2 in “Git case-sensitivity bug”
  1. CliffMay 10, 2018
  2. Bryan TurnerMay 10, 2018

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.