3 test_description
='merge simplification'
11 _x40
='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
12 _x40
="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
15 git name-rev
--tags --stdin |
sed -e "s|$_x40 (tags/\([^)]*\)) |\1 |g"
18 test_expect_success setup
'
19 echo "Hi there" >file &&
21 test_tick && git commit -m "Initial file" &&
24 git branch other-branch &&
28 test_tick && git commit -m "Modified file" &&
31 git checkout other-branch &&
35 test_tick && git commit -m "Modified the file identically" &&
38 echo "This is a stupid example" >another-file &&
39 git add another-file &&
40 test_tick && git commit -m "Add another file" &&
43 test_tick && git merge -m "merge" master &&
46 echo "Yet another" >elif &&
48 test_tick && git commit -m "Irrelevant change" &&
51 git checkout master &&
52 echo "Yet another" >elif &&
54 test_tick && git commit -m "Another irrelevant change" &&
57 test_tick && git merge -m "merge" other-branch &&
60 echo "Final change" >file &&
61 test_tick && git commit -a -m "Final change" &&
65 FMT
='tformat:%P %H | %s'
74 test_expect_success
"log $param" '
75 git log --pretty="$FMT" --parents $param |
77 sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
78 test_cmp expect check || {
85 check_result
'I H G F E D C B A' --full-history
86 check_result
'I H E C B A' --full-history -- file
87 check_result
'I H E C B A' --full-history --topo-order -- file
88 check_result
'I H E C B A' --full-history --date-order -- file
89 check_result
'I E C B A' --simplify-merges -- file
90 check_result
'I B A' -- file
91 check_result
'I B A' --topo-order -- file