revision.c: reduce object database queries
[gitweb.git] / revision.c
index 771d079f6edca39f8fa0d28db9bf697a99deeea6..29f82ccfe651ab123b5ca2b6074a39f2ef9e047c 100644 (file)
@@ -110,7 +110,8 @@ void mark_parents_uninteresting(struct commit *commit)
                         * it is popped next time around, we won't be trying
                         * to parse it and get an error.
                         */
-                       if (!has_object_file(&commit->object.oid))
+                       if (!commit->object.parsed &&
+                           !has_object_file(&commit->object.oid))
                                commit->object.parsed = 1;
 
                        if (commit->object.flags & UNINTERESTING)