Junio C Hamano | aab3b9a | 2009-03-12 00:02:12 -0700 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | test_description='test multi-tree read-tree without merging' |
| 4 | |
| 5 | . ./test-lib.sh |
Jens Lehmann | ea5070c | 2011-05-25 22:10:41 +0200 | [diff] [blame] | 6 | . "$TEST_DIRECTORY"/lib-read-tree.sh |
Junio C Hamano | aab3b9a | 2009-03-12 00:02:12 -0700 | [diff] [blame] | 7 | |
| 8 | test_expect_success setup ' |
| 9 | echo one >a && |
| 10 | git add a && |
| 11 | git commit -m initial && |
| 12 | git tag initial && |
| 13 | echo two >b && |
| 14 | git add b && |
| 15 | git commit -m second && |
| 16 | git checkout -b side initial && |
| 17 | echo three >a && |
| 18 | mkdir b && |
| 19 | echo four >b/c && |
| 20 | git add b/c && |
| 21 | git commit -m third |
| 22 | ' |
| 23 | |
| 24 | test_expect_success 'multi-read' ' |
Jens Lehmann | ea5070c | 2011-05-25 22:10:41 +0200 | [diff] [blame] | 25 | read_tree_must_succeed initial master side && |
Junio C Hamano | aab3b9a | 2009-03-12 00:02:12 -0700 | [diff] [blame] | 26 | (echo a; echo b/c) >expect && |
| 27 | git ls-files >actual && |
| 28 | test_cmp expect actual |
| 29 | ' |
| 30 | |
| 31 | test_done |
| 32 | |