builtin/log: downcase the beginning of error messages
[gitweb.git] / builtin / commit-tree.c
index 9fbd3529fb17bf46608a3a7617671adcd7036450..12cc403bd7eac3f3c195ce6533feee1865139bae 100644 (file)
@@ -6,6 +6,7 @@
 #include "cache.h"
 #include "config.h"
 #include "object-store.h"
+#include "repository.h"
 #include "commit.h"
 #include "tree.h"
 #include "builtin.h"
@@ -60,11 +61,18 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
                        if (get_oid_commit(argv[i], &oid))
                                die("Not a valid object name %s", argv[i]);
                        assert_oid_type(&oid, OBJ_COMMIT);
-                       new_parent(lookup_commit(&oid), &parents);
+                       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")) {