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
@ -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++;
|
||||
|
Reference in New Issue
Block a user