]> asedeno.scripts.mit.edu Git - git.git/blobdiff - fetch.c
Now that cache.h needs strbuf.h, remove useless includes.
[git.git] / fetch.c
diff --git a/fetch.c b/fetch.c
index dda33e548b65e79e22de8a84ab4d67ef13387a05..c256e6f6b45212a1dc99646d0ed3d234c087d96c 100644 (file)
--- a/fetch.c
+++ b/fetch.c
@@ -6,7 +6,6 @@
 #include "tag.h"
 #include "blob.h"
 #include "refs.h"
-#include "strbuf.h"
 
 int get_tree = 0;
 int get_history = 0;
@@ -46,6 +45,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)
@@ -215,7 +217,7 @@ int pull_targets_stdin(char ***target, const char ***write_ref)
        int targets = 0, targets_alloc = 0;
        struct strbuf buf;
        *target = NULL; *write_ref = NULL;
-       strbuf_init(&buf);
+       strbuf_init(&buf, 0);
        while (1) {
                char *rf_one = NULL;
                char *tg_one;