From 31fff305bcc6db3b8082eac7fc9e441b27964fea Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Tue, 9 May 2006 01:43:38 +0400 Subject: Separate object name errors from usage errors Separate object name errors from usage errors. Signed-off-by: Dmitry V. Levin Signed-off-by: Junio C Hamano --- read-tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'read-tree.c') diff --git a/read-tree.c b/read-tree.c index 26f4f7e323..e926e4c880 100644 --- a/read-tree.c +++ b/read-tree.c @@ -794,8 +794,8 @@ int main(int argc, char **argv) if (1 < index_only + update) usage(read_tree_usage); - if (get_sha1(arg, sha1) < 0) - usage(read_tree_usage); + if (get_sha1(arg, sha1)) + die("Not a valid object name %s", arg); if (list_tree(sha1) < 0) die("failed to unpack tree object %s", arg); stage++; -- cgit v1.2.3