summaryrefslogtreecommitdiffstats
path: root/describe.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2006-05-08 23:43:38 +0200
committerJunio C Hamano <junkio@cox.net>2006-05-09 01:25:33 +0200
commit31fff305bcc6db3b8082eac7fc9e441b27964fea (patch)
tree1681e28441508afae3f3e1bf602c4b0914d9c820 /describe.c
parentDocumentation: {caret} fixes (git-rev-list.txt) (diff)
downloadgit-31fff305bcc6db3b8082eac7fc9e441b27964fea.tar.xz
git-31fff305bcc6db3b8082eac7fc9e441b27964fea.zip
Separate object name errors from usage errors
Separate object name errors from usage errors. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'describe.c')
-rw-r--r--describe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/describe.c b/describe.c
index ff65742615..8a9cd5d52c 100644
--- a/describe.c
+++ b/describe.c
@@ -105,11 +105,11 @@ static void describe(char *arg, int last_one)
static int initialized = 0;
struct commit_name *n;
- if (get_sha1(arg, sha1) < 0)
- usage(describe_usage);
+ if (get_sha1(arg, sha1))
+ die("Not a valid object name %s", arg);
cmit = lookup_commit_reference(sha1);
if (!cmit)
- usage(describe_usage);
+ die("%s is not a valid '%s' object", arg, commit_type);
if (!initialized) {
initialized = 1;