cmd_fetch_pack(): return early if finish_connect() fails
[gitweb.git] / builtin / commit-tree.c
index 792670a9d18bc8e5126fe56c8755f9ac036a7728..eac901a0ee15f72eacffea32d1b327c7a336f19c 100644 (file)
@@ -54,7 +54,7 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
                        unsigned char sha1[20];
                        if (argc <= ++i)
                                usage(commit_tree_usage);
-                       if (get_sha1(argv[i], sha1))
+                       if (get_sha1_commit(argv[i], sha1))
                                die("Not a valid object name %s", argv[i]);
                        assert_sha1_type(sha1, OBJ_COMMIT);
                        new_parent(lookup_commit(sha1), &parents);
@@ -101,7 +101,7 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
                        continue;
                }
 
-               if (get_sha1(arg, tree_sha1))
+               if (get_sha1_tree(arg, tree_sha1))
                        die("Not a valid object name %s", arg);
                if (got_tree)
                        die("Cannot give more than one trees");
@@ -113,7 +113,7 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
                        die_errno("git commit-tree: failed to read");
        }
 
-       if (commit_tree(buffer.buf, tree_sha1, parents, commit_sha1,
+       if (commit_tree(&buffer, tree_sha1, parents, commit_sha1,
                        NULL, sign_commit)) {
                strbuf_release(&buffer);
                return 1;