Code

Ensure git ls-tree exits with a non-zero exit code if read_tree_recursive fails.
authorJon Seymour <jon.seymour@gmail.com>
Sun, 24 Jul 2011 14:59:14 +0000 (00:59 +1000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Jul 2011 17:50:11 +0000 (10:50 -0700)
commit04f89259a67ba1ec291f023b70278d41ed665a13
treececd5e08d1a365c5940006832a7c5ef836bf291e
parent6c1c14480ddf912fca5e09a6a7e66dee7793d2ea
Ensure git ls-tree exits with a non-zero exit code if read_tree_recursive fails.

In the case of a corrupt repository, git ls-tree may report an error but
presently it exits with a code of 0.

This change uses the return code of read_tree_recursive instead.

Improved-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/ls-tree.c
t/t3103-ls-tree-misc.sh