commit: give final warning when reattaching HEAD to leave commits behind
[git/jnareb-git.git] / t / t1008-read-tree-overlay.sh
blobf9e00285db662504b200fb25f0ed06c796346c52
1 #!/bin/sh
3 test_description='test multi-tree read-tree without merging'
5 . ./test-lib.sh
7 test_expect_success setup '
8 echo one >a &&
9 git add a &&
10 git commit -m initial &&
11 git tag initial &&
12 echo two >b &&
13 git add b &&
14 git commit -m second &&
15 git checkout -b side initial &&
16 echo three >a &&
17 mkdir b &&
18 echo four >b/c &&
19 git add b/c &&
20 git commit -m third
23 test_expect_success 'multi-read' '
24 git read-tree initial master side &&
25 (echo a; echo b/c) >expect &&
26 git ls-files >actual &&
27 test_cmp expect actual
30 test_done