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
yesOn 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.