Re: fatal: unable to read <hash>

From: Bjoern A. Zeeb <bzeeb-lists_at_lists.zabbadoz.net>
Date: Mon, 31 Jul 2023 01:21:41 UTC
On Wed, 26 Jul 2023, Marc Branchaud wrote:

Hi,

> Does the .git/gc.log file contain more info (I suspect not)?

fatal: unable to read b9cdc058e6eb1b3d8b5e29ad9b911d3da98f65a7
fatal: failed to run repack

> I've seen file ownership/permission problems if one sometimes runs git 
> commands as different users (particularly root and not-root) in the same 
> repo.
>
> So, first try to "chown -R me:mygroup ." at the top of your Git repo, to make 
> sure you own all the files, particularly the ones in .git/.
>
> I believe the gc operation is trying to read a file named
> 	.git/objects/b9/cdc058e6eb1b3d8b5e29ad9b911d3da98f65a7
> (note the / after "b9").
>
> If the chown doesn't fix things, take a look in .git/objects/b9/ and see 
> what's up with the files there.  The b9 directory itself might also have bad 
> juju.


freebsd-src% find . \! -user bz
freebsd-src% ls -l .git/objects/b9/cdc058e6eb1b3d8b5e29ad9b911d3da98f65a7
ls: .git/objects/b9/cdc058e6eb1b3d8b5e29ad9b911d3da98f65a7: No such file or directory
freebsd-src% ls -la .git/objects/b9
total 186
drwxr-xr-x    2 bz  bz     21 Jun 26 09:17 .
drwxr-xr-x  260 bz  bz    260 Jul 26 00:22 ..
-r--r--r--    1 bz  bz    365 Jan 18  2023 054fb1f0450b284b2e33b6dcf8a9b5b611371e
-r--r--r--    1 bz  bz  20979 Sep 21  2022 1350e39aee2ce395263f19622fb48c3e84e904
-r--r--r--    1 bz  bz     53 Oct 17  2022 30c1e8d4aaaf2f08f21b45618d6dff00285eec
-r--r--r--    1 bz  bz    479 Oct 17  2022 33183d37693a698d23f7c4fc74b8ca6f34b3cd
-r--r--r--    1 bz  bz   4846 Oct 22  2022 372f97998495f907249ab314fc7b6caa5acf72
-r--r--r--    1 bz  bz   4477 Feb 17 23:42 67a3be2a4f2db8b67d0f020be3ce2681b09d5c
-r--r--r--    1 bz  bz    367 Jun 26 09:17 72981ee4d7c649842f0d1577419bf0a63d5a44
-r--r--r--    1 bz  bz     76 Jan 12  2023 92c9340bf5edb01b18d7c13bc33eeaff40c18f
-r--r--r--    1 bz  bz   4784 Oct 17  2022 9474a6e9d5b652fe5735f51c29140aacc2031e
-r--r--r--    1 bz  bz   1434 Oct 22  2022 99f0fb4a36d81d5d23340fa98201739a046c8c
-r--r--r--    1 bz  bz   1436 Sep 21  2022 9ae940c337cb46ed1d5fc8e52414c9153c4055
-r--r--r--    1 bz  bz   1094 Jan 18  2023 9d03a186937745ece9035f45f848ea1acf0aab
-r--r--r--    1 bz  bz    439 Feb 17 21:20 a793d4d654e73672c75df4e9f935a41f65c701
-r--r--r--    1 bz  bz   1250 Feb 17 21:49 b4e371476259cb150d8c692eb492b32bc72ad4
-r--r--r--    1 bz  bz    266 Apr  2 22:25 bb1adc09948d081873493d4ed2504dd5833b78
-r--r--r--    1 bz  bz    259 Jun 26 09:14 d2448463f2e6d4a2cd5d14514fa530e6f92d64
-r--r--r--    1 bz  bz    360 Sep 25  2022 ed8076b54d71cf3903733888238d69e01776e4
-r--r--r--    1 bz  bz   2433 Sep 21  2022 ef6575c99a2d2e889a84853c97a2572c7e8f11
-r--r--r--    1 bz  bz   1437 Sep 21  2022 fb98f6f4e70fe292d7c84a11eebbcbe62c20e4
freebsd-src% find . -name "*cdc058*"
freebsd-src%


Not sure what to make out of all that...

-- 
Bjoern A. Zeeb                                                     r15:7