All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Git List Mailing <git@vger.kernel.org>
Subject: Re: "git symbolic-ref" doesn't do a very good job
Date: Sun, 31 Jul 2022 12:10:01 -0700	[thread overview]
Message-ID: <xmqqzggpyu7q.fsf@gitster.g> (raw)
In-Reply-To: <YuXKaLXhnR3mVlWk@coredump.intra.peff.net> (Jeff King's message of "Sat, 30 Jul 2022 20:18:48 -0400")

Jeff King <peff@peff.net> writes:

> I'm tempted to say that the symref-reading code should
> actually complain about following something outside of "refs/", but that
> carries an even higher possibility of breaking somebody. But it seems
> like we should be consistent between what we allow to be read, and what
> we allow to be written.
>
> At any rate, with the code as you have it above, I think the "make sure
> HEAD starts with refs/" code is now redundant.

Isn't the rule these days "HEAD must be either detached or point
into refs/heads/"?  I thought "checkout" ensures that, and I am
tempted to think that "symbolic-ref" that works on HEAD should be
consistent with "checkout".  So "make sure HEAD is within refs/"
would certainly be "not wrong per-se" but not sufficiently tight,
I suspect.


  parent reply	other threads:[~2022-07-31 19:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-30 19:53 "git symbolic-ref" doesn't do a very good job Linus Torvalds
2022-07-30 20:21 ` Linus Torvalds
2022-07-30 20:38   ` Junio C Hamano
2022-07-31  0:18   ` Jeff King
2022-07-31  0:24     ` Jeff King
2022-07-31  0:44       ` Linus Torvalds
2022-08-01 17:43         ` Jeff King
2022-08-01 17:46           ` Jeff King
2022-08-01 18:15           ` Jeff King
2022-08-01 18:54             ` Junio C Hamano
2022-08-02  0:46               ` Jeff King
2022-08-02  0:57                 ` Junio C Hamano
2022-08-01 19:00             ` Linus Torvalds
2022-07-31 19:10     ` Junio C Hamano [this message]
2022-08-01 17:36       ` Jeff King
2022-08-01 17:49         ` Linus Torvalds
2022-08-01 18:04           ` Jeff King

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

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

  git send-email \
    --in-reply-to=xmqqzggpyu7q.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=torvalds@linux-foundation.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.