Merge branch 'maint'
[gitweb.git] / fetch.c
diff --git a/fetch.c b/fetch.c
index 8e29d313f817981a29ebb65f2f579c9f1bd8e9b6..811be87a3c1e0d14d9f2b37650d56575b49caa22 100644 (file)
--- a/fetch.c
+++ b/fetch.c
@@ -15,7 +15,7 @@ int get_verbosely = 0;
 int get_recover = 0;
 static unsigned char current_commit_sha1[20];
 
-void pull_say(const char *fmt, const char *hex) 
+void pull_say(const char *fmt, const char *hex)
 {
        if (get_verbosely)
                fprintf(stderr, fmt, hex);
@@ -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)
@@ -153,7 +156,7 @@ static int process(struct object *obj)
                        return 0;
                prefetch(obj->sha1);
        }
-               
+
        object_list_insert(obj, process_queue_end);
        process_queue_end = &(*process_queue_end)->next;
        return 0;