[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: Re: "git symbolic-ref" doesn't do a very good job
From: Junio C Hamano <gitster () pobox ! com>
Date: 2022-07-31 19:10:01
Message-ID: xmqqzggpyu7q.fsf () gitster ! g
[Download RAW message or body]
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.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic