Merge branch 'rs/apply-avoid-over-reading'
[gitweb.git] / builtin / commit-tree.c
index 605017261c38dea1f5ada18c7d5b12446d6ea44f..a4a923d7c0b688e162c8e4d0411ff9b72748fb5c 100644 (file)
@@ -4,6 +4,7 @@
  * Copyright (C) Linus Torvalds, 2005
  */
 #include "cache.h"
+#include "config.h"
 #include "commit.h"
 #include "tree.h"
 #include "builtin.h"
@@ -58,7 +59,7 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
                        if (get_sha1_commit(argv[i], oid.hash))
                                die("Not a valid object name %s", argv[i]);
                        assert_sha1_type(oid.hash, OBJ_COMMIT);
-                       new_parent(lookup_commit(oid.hash), &parents);
+                       new_parent(lookup_commit(&oid), &parents);
                        continue;
                }