| # Copyright (c) 2006 Junio C Hamano |
| test_description='git read-tree --prefix test. |
| TEST_PASSES_SANITIZE_LEAK=true |
| test_expect_success setup ' |
| git update-index --add one && |
| tree=$(git write-tree) && |
| test_expect_success 'read-tree --prefix' ' |
| git read-tree --prefix=two/ $tree && |
| test_expect_success 'read-tree --prefix with leading slash exits with error' ' |
| test_must_fail git read-tree --prefix=/two/ $tree && |
| git read-tree --prefix=two/ $tree && |
| test_must_fail git read-tree --prefix=/ $tree && |
| git read-tree --prefix= $tree |