git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: Jacob Keller <jacob.keller@gmail.com>
Cc: Mike Rappazzo <rappazzo@gmail.com>,
	Stefan Beller <sbeller@google.com>,
	gitgitgadget@gmail.com, Git Mailing List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 1/1] worktree refs: fix case sensitivity for 'head'
Date: Fri, 14 Dec 2018 18:46:58 +0100	[thread overview]
Message-ID: <CACsJy8COqOMEk3Wzr==1-hsuGqdgKnbNfG_c90+xpU_oS-bW6A@mail.gmail.com> (raw)
In-Reply-To: <CACsJy8CT8K9SHnTsJT4HrxAK95yTz-x2DnNRBYKkvMyGbBZCgg@mail.gmail.com>

On Fri, Dec 14, 2018 at 6:38 PM Duy Nguyen <pclouds@gmail.com> wrote:
>
> On Fri, Dec 14, 2018 at 6:22 PM Jacob Keller <jacob.keller@gmail.com> wrote:
> >
> > On Thu, Dec 13, 2018 at 11:38 PM Duy Nguyen <pclouds@gmail.com> 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?
>
> Hmm.. yes. I don't know off hand if we have any pseudo refs in
> lowercase. Unlikely so yes this should work.

One thing we could do _today_ without waiting for a new refs backend
is, avoid looking up pseudo refs if the given ref name is not
all-caps. So "head" (or hEAd) can match refs/head, refs/tags/head,
refs/heads/head but never $GIT_DIR/HEAD. And yes I checked the code,
pseudo refs must be all-caps.
-- 
Duy

  reply	other threads:[~2018-12-14 17:47 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
2018-12-14 17:38                   ` Duy Nguyen
2018-12-14 17:46                     ` Duy Nguyen [this message]
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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to='CACsJy8COqOMEk3Wzr==1-hsuGqdgKnbNfG_c90+xpU_oS-bW6A@mail.gmail.com' \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=jacob.keller@gmail.com \
    --cc=rappazzo@gmail.com \
    --cc=sbeller@google.com \
    --subject='Re: [PATCH 1/1] worktree refs: fix case sensitivity for '\''head'\''' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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:

	https://80x24.org/mirrors/git.git

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