Re: [PATCH v2 3/8] packed-backend: check whether the "packed-refs" is regular
From: shejialuo <hidden>
Date: 2025-02-01 09:45:51
From: shejialuo <hidden>
Date: 2025-02-01 09:45:51
On Fri, Jan 31, 2025 at 08:20:36AM -0800, Junio C Hamano wrote:
shejialuo [off-list ref] writes:quoted
As I have said in the previous comment, we cannot detect the error if "HEAD" itself is corrupted. However, we will check the referent in the later. So, we don't need to do this.I still think you absolutely need to diagnose and tell the user about the broken HEAD. With your "don't check HEAD because a repository with a broken HEAD is not a repository", a check run in such a place may find everything else in the repository perfectly fine, but because the user wanted "git refs verify" to tell them about breakages, you would want to somehow tell them about it. Either it is missing, malformed, whatever.
Yes, that's absolutely correct. However, I don't want to do this in this series. Actually, there is no check for root ref. I will add checks for root refs later. Thanks, Jialuo