Karthik Nayak [off-list ref] 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.