builtin/log: downcase the beginning of error messages
[gitweb.git] / builtin / commit-tree.c
index e5bdf57b1e14cf54916c7eef077e63edddb28901..12cc403bd7eac3f3c195ce6533feee1865139bae 100644 (file)
@@ -5,6 +5,8 @@
  */
 #include "cache.h"
 #include "config.h"
+#include "object-store.h"
+#include "repository.h"
 #include "commit.h"
 #include "tree.h"
 #include "builtin.h"
@@ -58,12 +60,19 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
                                usage(commit_tree_usage);
                        if (get_oid_commit(argv[i], &oid))
                                die("Not a valid object name %s", argv[i]);
-                       assert_sha1_type(oid.hash, OBJ_COMMIT);
-                       new_parent(lookup_commit(&oid), &parents);
+                       assert_oid_type(&oid, OBJ_COMMIT);
+                       new_parent(lookup_commit(the_repository, &oid),
+                                                &parents);
                        continue;
                }
 
-               if (skip_prefix(arg, "-S", &sign_commit))
+               if (!strcmp(arg, "--gpg-sign")) {
+                   sign_commit = "";
+                   continue;
+               }
+
+               if (skip_prefix(arg, "-S", &sign_commit) ||
+                       skip_prefix(arg, "--gpg-sign=", &sign_commit))
                        continue;
 
                if (!strcmp(arg, "--no-gpg-sign")) {