aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-07-03 10:03:38 -0700
committerJunio C Hamano <gitster@pobox.com>2012-07-09 16:42:22 -0700
commit75f5ac04a2984fcf1e4d167047bfb63c5f385d44 (patch)
tree105f430c6dfbbab0124f315f1571b4cdbb0af925 /builtin
parentda3ac0c14993c5e8e41875cc3ead32be71647a7a (diff)
downloadgit-75f5ac04a2984fcf1e4d167047bfb63c5f385d44.tar.gz
git-75f5ac04a2984fcf1e4d167047bfb63c5f385d44.tar.xz
commit-tree: the command wants a tree and commits
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/commit-tree.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c
index 164b655df..cb982c550 100644
--- a/builtin/commit-tree.c
+++ b/builtin/commit-tree.c
@@ -48,8 +48,8 @@ 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]);
+ if (get_sha1_tree(argv[1], tree_sha1))
+ die("Not a valid tree object name %s", argv[1]);
for (i = 1; i < argc; i++) {
const char *arg = argv[i];
@@ -57,7 +57,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);
@@ -104,7 +104,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");