From: Junio C Hamano Date: Thu, 02 Oct 2025 14:45:18 GMT Subject: Re: [PATCH 0/1] files-backend: check symref name before update Message-ID: In-Reply-To: Karthik Nayak writes: > The bigger question for me is if there is an instance that you'd want to > modify the HEAD file manually. Or is there a way this can be done via > any of the existing Git commands. Otherwise, I'm not sure I would call > this a bug. As we discussed downthread, I tend to agree with you here that this is a corrupt repository leading the tool to do a nonsensical thing, and the true bug here is that "fsck" is not catching it. But I do not mind if we add a check at runtime, probably at the location the patch under discussion identified, that makes sure a symbolic ref points at a valid target the same way "git fsck" does. Thanks.