pack-redundant: rename pack_list.all_objects
[gitweb.git] / builtin / commit-tree.c
index e5bdf57b1e14cf54916c7eef077e63edddb28901..9ec36a82b63c0216cca11a709310e12174726e91 100644 (file)
@@ -5,6 +5,8 @@
  */
 #include "cache.h"
 #include "config.h"
+#include "object-store.h"
+#include "repository.h"
 #include "commit.h"
 #include "tree.h"
 #include "builtin.h"
@@ -58,8 +60,9 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
                                usage(commit_tree_usage);
                        if (get_oid_commit(argv[i], &oid))
                                die("Not a valid object name %s", argv[i]);
-                       assert_sha1_type(oid.hash, OBJ_COMMIT);
-                       new_parent(lookup_commit(&oid), &parents);
+                       assert_oid_type(&oid, OBJ_COMMIT);
+                       new_parent(lookup_commit(the_repository, &oid),
+                                                &parents);
                        continue;
                }