commit: add short-circuit to paint_down_to_common()
[gitweb.git] / packfile.c
index 3eb9c4a36e66faf5fd22c8287ea14fd01ee95a79..88ba8191518711d24fb42fdd2cd0bb3f70fd2397 100644 (file)
@@ -1925,7 +1925,7 @@ static int add_promisor_object(const struct object_id *oid,
                struct commit *commit = (struct commit *) obj;
                struct commit_list *parents = commit->parents;
 
-               oidset_insert(set, &commit->maybe_tree->object.oid);
+               oidset_insert(set, get_commit_tree_oid(commit));
                for (; parents; parents = parents->next)
                        oidset_insert(set, &parents->item->object.oid);
        } else if (obj->type == OBJ_TAG) {