From 5476e1efded571e374cd97c7d69f17962ba1c44f Mon Sep 17 00:00:00 2001 From: Jonathan Tan Date: Mon, 22 Feb 2021 11:20:09 -0800 Subject: fetch-pack: print and use dangling .gitmodules Teach index-pack to print dangling .gitmodules links after its "keep" or "pack" line instead of declaring an error, and teach fetch-pack to check such lines printed. This allows the tree side of the .gitmodules link to be in one packfile and the blob side to be in another without failing the fsck check, because it is now fetch-pack which checks such objects after all packfiles have been downloaded and indexed (and not index-pack on an individual packfile, as it is before this commit). Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- fsck.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fsck.c') diff --git a/fsck.c b/fsck.c index f82e2fe9e3..49ef6569e8 100644 --- a/fsck.c +++ b/fsck.c @@ -1243,6 +1243,11 @@ int fsck_error_function(struct fsck_options *o, return 1; } +void register_found_gitmodules(const struct object_id *oid) +{ + oidset_insert(&gitmodules_found, oid); +} + int fsck_finish(struct fsck_options *options) { int ret = 0; -- cgit v1.2.3