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 --- unpack-file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'unpack-file.c') diff --git a/unpack-file.c b/unpack-file.c index 23a8562301..ccddf1d4b0 100644 --- a/unpack-file.c +++ b/unpack-file.c @@ -27,8 +27,10 @@ int main(int argc, char **argv) { unsigned char sha1[20]; - if (argc != 2 || get_sha1(argv[1], sha1)) + if (argc != 2) usage("git-unpack-file "); + if (get_sha1(argv[1], sha1)) + die("Not a valid object name %s", argv[1]); setup_git_directory(); git_config(git_default_config); -- cgit v1.2.3