git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Ignore submodule commits when fetching over dumb protocols

From
SVSven Verdoolaege <skimo@liacs.nl>
Date
Jun 26, 2007, 21:19 UTC
Message-ID
<20070626211940.GA27221@liacs.nl>

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
Next: Linus Torvalds
Message 1 of 3 in “Ignore submodule commits when fetching over dumb protocols”
  1. Ignore submodule commits when fetching over dumb protocolsSven Verdoolaege, Jun 26, 2007
  2. Linus TorvaldsJun 26, 2007
  3. Junio C HamanoJun 27, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.