Re: [PATCH v2 07/10] refs: root refs can be symbolic refs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24/05/02 10:07AM, Patrick Steinhardt wrote:
> On Tue, Apr 30, 2024 at 12:09:57PM -0500, Justin Tobler wrote:

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

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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux