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

Re: Possible bug with branch names and case sensitivity

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Nov 23, 2011, 20:50 UTC
Message-ID
<CACBZZX4qs8-u33bZbrxYS1CrwjTQc=4YOk2SUjtYzL=vc9KYgA@mail.gmail.com>
In-Reply-To
<CAG+J_DxREbykWggrD49L7qvR9M36wKL7+_kOYbvcWmLBCF2Gog@mail.gmail.com>
On Tue, Nov 22, 2011 at 18:31, Jay Soffian <jaysoffian@gmail.com> wrote:
> I wonder what the downside would be of always using packed refs on
> case-insenstive file systems. This would seem analogous to how git no
> longer uses symlinks.

Note that Git doesn't only have confusing behavior with refs on case-insensitive filesystems. The other day HFS+ users @ work had issues because of a case collision in the checked out tree, which confused git status et al.

Note that HFS+ in particular is case-insensitive *but* case preserving. E.g.:

    $ touch Foo; perl -wle 'opendir my $d, "."; print while readdir
$d; -f and print "yes" for qw(foo Foo FOO)'
    .
    ..
    Foo
    yes
    yes
    yes

On case-insensitive and not-case-preserving systems the third line would usually print either "foo" or "FOO", but on HFS+ the system preserves the original name.

This means that you can in some cases figure out what's going on by doing a readdir() in addition to a stat() as you could do on POSIX-compliant systems.

Previous: Michael HaggertyNext: Joshua Jensen
Message 6 of 11 in “Possible bug with branch names and case sensitivity”
  1. Gerd KnopsNov 19, 2011
  2. Jay SoffianNov 21, 2011
  3. Michael HaggertyNov 22, 2011
  4. Jay SoffianNov 22, 2011
  5. Michael HaggertyNov 23, 2011
  6. Ævar Arnfjörð BjarmasonNov 23, 2011
  7. Joshua JensenNov 23, 2011
  8. Junio C HamanoNov 22, 2011
  9. Michael HaggertyNov 23, 2011
  10. Junio C HamanoNov 23, 2011
  11. Junio C HamanoNov 22, 2011

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.