Ensure git ls-tree exits with a non-zero exit code if read_tree_recursive fails.