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