Add a test to check that git ls-tree sets non-zero exit code on error.