aboutsummaryrefslogtreecommitdiff
path: root/ls-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'ls-tree.c')
-rw-r--r--ls-tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ls-tree.c b/ls-tree.c
index e4ef20098..f2b3bc123 100644
--- a/ls-tree.c
+++ b/ls-tree.c
@@ -142,8 +142,8 @@ int main(int argc, const char **argv)
if (argc < 2)
usage(ls_tree_usage);
- if (get_sha1(argv[1], sha1) < 0)
- usage(ls_tree_usage);
+ if (get_sha1(argv[1], sha1))
+ die("Not a valid object name %s", argv[1]);
pathspec = get_pathspec(prefix, argv + 2);
tree = parse_tree_indirect(sha1);