Skip to content

Commit 582c739

Browse files
Sven Verdoolaegegitster
authored andcommitted
Ignore submodule commits when fetching over dumb protocols
Without this patch, the code would look for the submodule commits in the superproject and (needlessly) fail when it couldn't find them. Signed-off-by: Sven Verdoolaege <[email protected]> Acked-by: Linus Torvalds <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c7c8485 commit 582c739

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fetch.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ static int process_tree(struct tree *tree)
4646
while (tree_entry(&desc, &entry)) {
4747
struct object *obj = NULL;
4848

49+
/* submodule commits are not stored in the superproject */
50+
if (S_ISDIRLNK(entry.mode))
51+
continue;
4952
if (S_ISDIR(entry.mode)) {
5053
struct tree *tree = lookup_tree(entry.sha1);
5154
if (tree)

0 commit comments

Comments
 (0)