Re: [PATCH 0/4] Check .gitmodules when using packfile URIs
From: Junio C Hamano <hidden>
Date: 2021-02-18 23:35:06
Jonathan Tan [off-list ref] writes:
This patch set resolves the .gitmodules-and-tree-in-separate-packfiles issue I mentioned in [1] by having index-pack print out all dangling .gitmodules (instead of returning with an error code) and then teaching fetch-pack to read those and run its own fsck checks after all index-pack invocations are complete. As part of this, index-pack has to output (1) the hash that goes into the name of the .pack/.idx file and (2) the hashes of all dangling .gitmodules. I just had (2) come after (1). If anyone has a better idea, I'm interested. I also discovered a bug in that different index-pack arguments were used when processing the inline packfile and when processing the ones referenced by URIs. Patch 1-3 fixes that bug by passing the arguments to use as a space-separated URL-encoded list. (URL-encoded so that we can have spaces in the arguments.) Again, if anyone has a better idea, I'm interested. It is only in patch 4 that we have the dangling .gitmodules fix.
This seems to have been stalled but I think it would be a better approach to use a custom callback for error reporting, suggested by Ævar, which would be where his fsck API clean-up topic would lead to. If it is not ultra-urgent, perhaps you can retract the ones that are queued right now, work with Ævar to finish the error-callback work and rebuild this topic on top of it? Thanks.