]>
Commit | Line | Data |
---|---|---|
beb5af43 AS |
1 | #!/bin/sh |
2 | ||
3 | test_description='--show-all --parents does not rewrite TREESAME commits' | |
4 | ||
5 | . ./test-lib.sh | |
6 | ||
7 | test_expect_success 'set up --show-all --parents test' ' | |
8 | test_commit one foo.txt && | |
ae4c094e | 9 | commit1=$(git rev-list -1 HEAD) && |
beb5af43 | 10 | test_commit two bar.txt && |
ae4c094e | 11 | commit2=$(git rev-list -1 HEAD) && |
beb5af43 | 12 | test_commit three foo.txt && |
ae4c094e | 13 | commit3=$(git rev-list -1 HEAD) |
beb5af43 AS |
14 | ' |
15 | ||
16 | test_expect_success '--parents rewrites TREESAME parents correctly' ' | |
17 | echo $commit3 $commit1 > expected && | |
18 | echo $commit1 >> expected && | |
19 | git rev-list --parents HEAD -- foo.txt > actual && | |
20 | test_cmp expected actual | |
21 | ' | |
22 | ||
23 | test_expect_success '--parents --show-all does not rewrites TREESAME parents' ' | |
24 | echo $commit3 $commit2 > expected && | |
25 | echo $commit2 $commit1 >> expected && | |
26 | echo $commit1 >> expected && | |
27 | git rev-list --parents --show-all HEAD -- foo.txt > actual && | |
28 | test_cmp expected actual | |
29 | ' | |
30 | ||
31 | test_done |