[PATCH] Ignore submodule commits when fetching over dumb protocols

Subsystems: the rest

DORMANTno replies

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

[PATCH] Ignore submodule commits when fetching over dumb protocols

From: Sven Verdoolaege <hidden>
Date: 2016-06-15 22:43:18

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 <redacted>
---
 fetch.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
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

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

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:43:18


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

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:18

Linus Torvalds [off-list ref] writes:
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help