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>
This commit is contained in:

committed by
Junio C Hamano

parent
afb4ff2069
commit
31fff305bc
@ -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 <sha1>");
|
||||
if (get_sha1(argv[1], sha1))
|
||||
die("Not a valid object name %s", argv[1]);
|
||||
|
||||
setup_git_directory();
|
||||
git_config(git_default_config);
|
||||
|
Reference in New Issue
Block a user