Re: [PATCH v2 07/10] refs: root refs can be symbolic refs
- From
Justin Tobler <jltobler@gmail.com>
- Date
- May 3, 2024, 20:49 UTC
- Message-ID
- <maqra7gbokanvptimdk57gaaitdxdpaxse725odzcvqieqfhbc@sgdmfeuhi5hj>
- In-Reply-To
- <ZjNJ3j2wSgui_cG8@tanuki>
On 24/05/02 10:07AM, Patrick Steinhardt wrote:
> On Tue, Apr 30, 2024 at 12:09:57PM -0500, Justin Tobler wrote:
Show 9 quoted lines
> > I'm not quite sure I understand why we are changing the behavior of > > `is_headref()` here. Do we no longer want to validate the ref exists if > > it is symbolic? > > The implementation does not conform to the definition of a "HEAD" ref. > Even before this patch series, a "HEAD" ref could either be a symbolic > or a regular ref. So to answer the question of "Is this a HEAD ref?" you > only need to check whether the ref exists, not whether its target > exists.
Thanks Patrick! I think this explantion might be good to add to the commit message.
Show 6 quoted lines
> > In a prior commit, `is_headref()` is commented to mention that we check > > whether the reference exists. Maybe that could use some additional > > clarification? > > Which particular commit do you refer to? It's not part of this series, > is it?
I'm refering to the comment added above `is_headref()` in (refs: classify HEAD as a root ref, 2024-04-30):
"Check whether the reference is "HEAD" and whether it exists."
Maybe I misunderstand its intent though.
-Justin