wildmatch: make wildmatch's return value compatible with fnmatch
[gitweb.git] / builtin / commit-tree.c
index d5e19af54702d5d2ab38a5e4ef2cab6c9b88eead..a0df12ce16abda416fc9f33448bc895e74f4b0d1 100644 (file)
@@ -48,9 +48,6 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
        if (argc < 2 || !strcmp(argv[1], "-h"))
                usage(commit_tree_usage);
 
-       if (get_sha1(argv[1], tree_sha1))
-               die("Not a valid object name %s", argv[1]);
-
        for (i = 1; i < argc; i++) {
                const char *arg = argv[i];
                if (!strcmp(arg, "-p")) {
@@ -116,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;