git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Junio C Hamano <gitster@pobox.com>
Cc: Mike Hommey <mh@glandium.org>,
	git@vger.kernel.org, git-packagers@googlegroups.com
Subject: Re: [ANNOUNCE] Git v2.44.0
Date: Tue, 27 Feb 2024 08:02:38 +0100	[thread overview]
Message-ID: <Zd2JBk7JWEGENAiu@tanuki> (raw)
In-Reply-To: <xmqqbk84jwfy.fsf@gitster.g>

[-- Attachment #1: Type: text/plain, Size: 1014 bytes --]

On Sun, Feb 25, 2024 at 09:16:49AM -0800, Junio C Hamano wrote:
> Patrick Steinhardt <ps@pks.im> writes:
> 
> > That's ultimately the reason why I don't want HEAD to look like a proper
> > ref. But doing the "refs/heads/.invalid" workaround shouldn't be too bad,
> > I guess.
> 
> Isn't the reason why reftable backend initializes refs/heads to be a
> regular file exactly because we want to reject an attempt to create
> such a file on the filesystem, though?

Yeah, "refs/heads" being a file is also part of this mechanism. But that
wouldn't help a client that e.g. uses git-symbolic-ref(1) while assuming
the old "files" backend, because they would now get a plausible value of
whatever value we have in there if we were to initialize it e.g. with
"refs/heads/main".

That's why we have both mechanisms -- it's a bit like defense in depth.
One could go even further and make "HEAD" contain complete garbage,
only, so that anybody who was trying to read it would fail immediately.

Patrick

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-02-27  7:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23 17:17 [ANNOUNCE] Git v2.44.0 Junio C Hamano
2024-02-24  5:10 ` Mike Hommey
2024-02-24  6:36   ` Patrick Steinhardt
2024-02-24 19:55     ` Mike Hommey
2024-02-25  7:09       ` Patrick Steinhardt
2024-02-25 17:16         ` Junio C Hamano
2024-02-27  7:02           ` Patrick Steinhardt [this message]
2024-02-27 14:29     ` Patrick Steinhardt

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=Zd2JBk7JWEGENAiu@tanuki \
    --to=ps@pks.im \
    --cc=git-packagers@googlegroups.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mh@glandium.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).