summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Sven Verdoolaege <skimo@liacs.nl>2007-06-26 23:19:41 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-06-26 18:02:13 -0700
commit582c7393a47894ea299a82c2ae91fec3101e7559 (patch)
tree23243e4fdf2ae690765b38a2ea2460d589e8bfc8
parentGIT 1.5.2.2 (diff)
downloadtgif-582c7393a47894ea299a82c2ae91fec3101e7559.tar.xz
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 <skimo@liacs.nl> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--fetch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fetch.c b/fetch.c
index 8e29d313f8..6f1f420be2 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_ISDIRLNK(entry.mode))
+ continue;
if (S_ISDIR(entry.mode)) {
struct tree *tree = lookup_tree(entry.sha1);
if (tree)