]>
Commit | Line | Data |
---|---|---|
aab3b9a1 JH |
1 | #!/bin/sh |
2 | ||
3 | test_description='test multi-tree read-tree without merging' | |
4 | ||
06d53148 | 5 | GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main |
334afbc7 JS |
6 | export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME |
7 | ||
9081a421 | 8 | TEST_PASSES_SANITIZE_LEAK=true |
aab3b9a1 | 9 | . ./test-lib.sh |
ea5070c9 | 10 | . "$TEST_DIRECTORY"/lib-read-tree.sh |
aab3b9a1 JH |
11 | |
12 | test_expect_success setup ' | |
13 | echo one >a && | |
14 | git add a && | |
15 | git commit -m initial && | |
16 | git tag initial && | |
17 | echo two >b && | |
18 | git add b && | |
19 | git commit -m second && | |
20 | git checkout -b side initial && | |
21 | echo three >a && | |
22 | mkdir b && | |
23 | echo four >b/c && | |
24 | git add b/c && | |
25 | git commit -m third | |
26 | ' | |
27 | ||
28 | test_expect_success 'multi-read' ' | |
06d53148 | 29 | read_tree_must_succeed initial main side && |
0590ff26 | 30 | test_write_lines a b/c >expect && |
aab3b9a1 JH |
31 | git ls-files >actual && |
32 | test_cmp expect actual | |
33 | ' | |
34 | ||
35 | test_done | |
36 |