Re: fatal: unable to read <hash>

From: Bjoern A. Zeeb <bzeeb-lists_at_lists.zabbadoz.net>
Date: Mon, 07 Aug 2023 05:18:38 UTC
On Mon, 31 Jul 2023, Marc Branchaud wrote:

>
> On 2023-07-30 21:21, Bjoern A. Zeeb wrote:
>> 
>> freebsd-src% find . \! -user bz
>> freebsd-src% ls -l .git/objects/b9/cdc058e6eb1b3d8b5e29ad9b911d3da98f65a7
>> ls: .git/objects/b9/cdc058e6eb1b3d8b5e29ad9b911d3da98f65a7: No such file or 
>> directory
>
> So it seems like the cdc058e6eb1b3d8b5e29ad9b911d3da98f65a7 object is really 
> missing and not just inaccessible.  (Note that Git also stores objects in 
> .pack files -- see "git help pack-objects" -- but I'm figuring those files 
> are also accessible.)
>
> To try to figure out what is referring to object 
> cdc058e6eb1b3d8b5e29ad9b911d3da98f65a7, try running
> 	git fsck --name-objects --connectivity-only --no-dangling

%  git fsck --name-objects --connectivity-only --no-dangling
error: b9cdc058e6eb1b3d8b5e29ad9b911d3da98f65a7: invalid sha1 pointer in resolve-undo of .git/worktrees/bz_maxmodname_D32383/index
Checking connectivity: 4743571, done.
Verifying commits in commit graph: 100% (384308/384308), done.

The good news upfront;  I could ditch that worktree and branch if that
will fix things.  It has follow-up work to the 2021 things but I have
a copy of that outside that git tree (I love patch files in port trees :)

/bz

-- 
Bjoern A. Zeeb                                                     r15:7