Git development
 help / color / mirror / Atom feed
* [PATCH] Ignore submodule commits when fetching over dumb protocols
@ 2007-06-26 21:19 Sven Verdoolaege
  2007-06-26 21:36 ` Linus Torvalds
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Verdoolaege @ 2007-06-26 21:19 UTC (permalink / raw)
  To: git, Junio C Hamano

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(-)

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-27  0:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-26 21:19 [PATCH] Ignore submodule commits when fetching over dumb protocols Sven Verdoolaege
2007-06-26 21:36 ` Linus Torvalds
2007-06-27  0:41   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox