[PATCH] fetch.c: Remove call to parse_object() from process()
[git.git] / fetch.c
diff --git a/fetch.c b/fetch.c
index 390de99..e6fd624 100644 (file)
--- a/fetch.c
+++ b/fetch.c
@@ -54,9 +54,9 @@ static int process_tree(struct tree *tree)
        return 0;
 }
 
-#define COMPLETE       1U
-#define TO_SCAN                4U
-#define SEEN           16U
+#define COMPLETE       (1U << 0)
+#define SEEN           (1U << 1)
+#define TO_SCAN                (1U << 2)
 
 static struct commit_list *complete = NULL;
 
@@ -134,22 +134,16 @@ static int process(struct object *obj)
        obj->flags |= SEEN;
 
        if (has_sha1_file(obj->sha1)) {
-               parse_object(obj->sha1);
                /* We already have it, so we should scan it now. */
-               if (obj->flags & TO_SCAN)
-                       return 0;
-               object_list_insert(obj, process_queue_end);
-               process_queue_end = &(*process_queue_end)->next;
                obj->flags |= TO_SCAN;
-               return 0;
+       } else {
+               if (obj->flags & COMPLETE)
+                       return 0;
+               prefetch(obj->sha1);
        }
-       if (obj->flags & COMPLETE)
-               return 0;
+               
        object_list_insert(obj, process_queue_end);
        process_queue_end = &(*process_queue_end)->next;
-
-       prefetch(obj->sha1);
-               
        return 0;
 }