list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Jacob Keller <>
To: Duy Nguyen <>
Cc: Mike Rappazzo <>,
	Stefan Beller <>,, Git mailing list <>,
	Junio C Hamano <>
Subject: Re: [PATCH 1/1] worktree refs: fix case sensitivity for 'head'
Date: Fri, 14 Dec 2018 09:22:37 -0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Thu, Dec 13, 2018 at 11:38 PM Duy Nguyen <> wrote:
> Even with a new ref storage, I'm pretty sure pseudo refs like HEAD,
> FETCH_HEAD... will forever be backed by filesystem. HEAD for example
> is part of the repository signature and must exist as a file. We could
> also lookup pseudo refs with readdir() instead of lstat(). On
> case-preserving-and-insensitive filesystems, we can reject "head" this
> way. But that comes with a high cost.
> --
> Duy

Once other refs are backed by something that doesn't depend on
filesystem case sensitivity, you could enforce that we only accept
call-caps HEAD as a psuedo ref, and always look up other spellings in
the other refs backend, though, right? So, yea the actual file may not
be case sensitive, but we would never create refs/head anymore for any
reason, so there would be no ambiguity if reading the refs/head vs
refs/HEAD on a case insensitive file system, since refs/head would no
longer be a legitimate ref stored as a file if you used a different
refs backend.

Basically, we'd be looking up HEAD by checking the file, but we'd stop
looking up head, hEAd, etc in the files, and instead use whatever
other refs backend for non-pseudo refs. Thus, it wouldn't matter,
since we'd never actually lookup the other spellings of HEAD as a
file. Wouldn't that solve the ambiguity, at least once a repository
has fully switched to some alternative refs backend for non-pseudo
refs? (Unless I mis-understand and refs/head could be an added pseudo


  reply	other threads:[~2018-12-14 17:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13 19:54 [PATCH 0/1] " Michael Rappazzo via GitGitGadget
2018-12-13 19:54 ` [PATCH 1/1] " Michael Rappazzo via GitGitGadget
2018-12-13 20:23   ` Duy Nguyen
2018-12-13 20:34     ` Mike Rappazzo
2018-12-13 20:43       ` Duy Nguyen
2018-12-13 20:47         ` Stefan Beller
2018-12-13 21:14           ` Mike Rappazzo
2018-12-14  0:33             ` brian m. carlson
2018-12-14  6:49             ` Jacob Keller
2018-12-14  7:37               ` Duy Nguyen
2018-12-14 17:22                 ` Jacob Keller [this message]
2018-12-14 17:38                   ` Duy Nguyen
2018-12-14 17:46                     ` Duy Nguyen
2018-12-14 18:48                       ` Jacob Keller
2018-12-14 18:47                     ` Jacob Keller
2018-12-13 21:07         ` Mike Rappazzo
2018-12-14  3:31         ` Junio C Hamano
2018-12-14 10:36 ` [PATCH 0/1] " Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \ \ \ \ \
    --subject='Re: [PATCH 1/1] worktree refs: fix case sensitivity for '\''head'\''' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).