threads / patch / 8736

patchIgnore submodule commits when fetching over dumb protocols

Subject: [PATCH] Ignore submodule commits when fetching over dumb protocols

## tl;dr

3 messages between Jun 26, 2007 and Jun 27, 2007. Diffs are folded; open one to read it.

replies: 2people: 3as markdown or json

Sven Verdoolaege· Jun 26, 2007, 21:19 UTC · lore

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 <skimo@liacs.nl>
---
 fetch.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Show changes to fetch.c +3 −0
diff --git a/fetch.c b/fetch.c
index dda33e5..811be87 100644
--- a/fetch.c
+++ b/fetch.c
@@ -46,6 +46,9 @@ static int process_tree(struct tree *tree)
 	while (tree_entry(&desc, &entry)) {
 		struct object *obj = NULL;
 
+		/* submodule commits are not stored in the superproject */
+		if (S_ISGITLINK(entry.mode))
+			continue;
 		if (S_ISDIR(entry.mode)) {
 			struct tree *tree = lookup_tree(entry.sha1);
 			if (tree)
-- 
1.5.2.2.549.gaeb59
Linus Torvalds· Jun 26, 2007, 21:36 UTC · re: Sven Verdoolaege · lore

Re: [PATCH] Ignore submodule commits when fetching over dumb protocols

On Tue, 26 Jun 2007, Sven Verdoolaege wrote:
>
> Without this patch, the code would look for the submodule
> commits in the superproject and (needlessly) fail when it
> couldn't find them.
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>

This should probably be put in the maintenance branch, since I think we've tried to make sure that the current 1.5.x series plumbing can handle superproject data even if it doesn't then have the porcelain to make it all easy..

		Linus
Junio C Hamano· Jun 27, 2007, 00:41 UTC · re: Linus Torvalds · lore

Re: [PATCH] Ignore submodule commits when fetching over dumb protocols

Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 6 quoted lines
> Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
>
> This should probably be put in the maintenance branch, since I think we've 
> tried to make sure that the current 1.5.x series plumbing can handle 
> superproject data even if it doesn't then have the porcelain to make it 
> all easy..
Thanks, both.

← back to recent threads