p5551: add a script to test fetch pack-dir rescans
[gitweb.git] / builtin / commit-tree.c
index 605017261c38dea1f5ada18c7d5b12446d6ea44f..c1de41c67f8c245ab53b3c3c86a9ad981f433917 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;
                }
 
@@ -101,7 +102,6 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
                        if (fd && close(fd))
                                die_errno("git commit-tree: failed to close '%s'",
                                          argv[i]);
-                       strbuf_complete_line(&buffer);
                        continue;
                }