git-fsck complains about cgit repo

John Keeping john at keeping.me.uk
Wed Aug 15 16:08:26 CEST 2018


On Wed, Aug 15, 2018 at 09:32:18AM -0400, Konstantin Ryabitsev wrote:
> Since cgit is mirrored to git.kernel.org, which gets routine fsck 
> treatment, I started getting the following error reports:
> 
>   error: bad config line 5 in blob .gitmodules
>   error in blob 51dd1eff1edc663674df9ab85d2786a40f7ae3a5: gitmodulesParse: could not parse gitmodules blob
> 
> I can easily reproduce this:
> 
> user at chatter:/tmp$ rpm -q git
> git-2.17.1-3.fc28.x86_64
> user at chatter:/tmp$ git clone --mirror https://git.zx2c4.com/cgit
> Cloning into bare repository 'cgit.git'...
> remote: Counting objects: 7043, done.
> remote: Compressing objects: 100% (2679/2679), done.
> remote: Total 7043 (delta 4933), reused 6211 (delta 4347)
> Receiving objects: 100% (7043/7043), 8.71 MiB | 1.89 MiB/s, done.
> Resolving deltas: 100% (4933/4933), done.
> user at chatter:/tmp$ cd cgit.git/
> user at chatter:/tmp/cgit.git$ git fsck
> Checking object directories: 100% (256/256), done.
> error: bad config line 5 in blob .gitmodules
> error in blob 51dd1eff1edc663674df9ab85d2786a40f7ae3a5: gitmodulesParse: could not parse gitmodules blob
> Checking objects: 100% (7043/7043), done.
> user at chatter:/tmp/cgit.git$ 
> 
> Is that something that can be fixed, or should I just ignore this error?

I think this is historic because CGit had a submodule before
git-submodule was invented (in fact, looking at the history I think
git-submodule was derived from CGit's earlier implementation).

The format of .gitmodules in the original CGit implementation was
simpler than git-submodule uses and that is the source of the complaint.

If you can ignore it just for that blob that would be best, since I hope
we don't introduce invalid .gitsubmodule entries in the future.


Regards,
John


More information about the CGit mailing list