Re: [PATCH 1/1] worktree refs: fix case sensitivity for 'head'
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Dec 14, 2018, 00:33 UTC
- Message-ID
- <20181214003350.GS890086@genre.crustytoothpaste.net>
- In-Reply-To
- <CANoM8SWQTAEYGiUC9PnWi8u9oAJYPcyiE5+5usoRvR7Vw2z0JA@mail.gmail.com>
On Thu, Dec 13, 2018 at 04:14:28PM -0500, Mike Rappazzo wrote:
Show 14 quoted lines
> On Thu, Dec 13, 2018 at 3:48 PM Stefan Beller <sbeller@google.com> wrote: > > > > > > The current situation is definitely a problem. If I am in a worktree, > > > > using "head" should be the same as "HEAD". > > > > By any chance, is your file system case insensitive? > > That is usually the source of confusion for these discussions. > > This behavior is the same for MacOS (High Sierra) and Windows 7. I > assume other derivatives of those act the same. > > On CentOS "head" is an ambiguous ref. If Windows and Mac resulted in > an ambiguous ref, that would also be OK, but as it is now, they return > the result of "HEAD" on the primary worktree.
I'm pretty sure that we want HEAD to be only written as "HEAD". It's known that systems with case-insensitive file systems sometimes allow "head" instead of "HEAD" because the ref is written in the file system.
I think the improvement we'd want here is to reject HEAD being written as "head" on those systems, but in a global way that affects all uses of HEAD.
-- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204