submodule--helper: offer a consistent API
[gitweb.git] / builtin / commit-tree.c
index 15de7e8f2203f884d88ec8497f123ca1c713b844..8a674bc9e759116a06f7464222ec591472b65610 100644 (file)
 #include "utf8.h"
 #include "gpg-interface.h"
 
-static const char commit_tree_usage[] = "git commit-tree [(-p <sha1>)...] [-S[<keyid>]] [-m <message>] [-F <file>] <sha1> <changelog";
+static const char commit_tree_usage[] = "git commit-tree [(-p <sha1>)...] [-S[<keyid>]] [-m <message>] [-F <file>] <sha1>";
 
 static const char *sign_commit;
 
 static void new_parent(struct commit *parent, struct commit_list **parents_p)
 {
-       unsigned char *sha1 = parent->object.sha1;
+       struct object_id *oid = &parent->object.oid;
        struct commit_list *parents;
        for (parents = *parents_p; parents; parents = parents->next) {
                if (parents->item == parent) {
-                       error("duplicate parent %s ignored", sha1_to_hex(sha1));
+                       error("duplicate parent %s ignored", oid_to_hex(oid));
                        return;
                }
                parents_p = &parents->next;