Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit d5d2fc8

Browse files
committed
t6012: update test for tweaked full-history traversal
Signed-off-by: Junio C Hamano <[email protected]>
1 parent d0af663 commit d5d2fc8

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

t/t6012-rev-list-simplify.sh

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,24 @@ unnote () {
1414

1515
test_expect_success setup '
1616
echo "Hi there" >file &&
17-
git add file &&
18-
test_tick && git commit -m "Initial file" &&
17+
echo "initial" >lost &&
18+
git add file lost &&
19+
test_tick && git commit -m "Initial file and lost" &&
1920
note A &&
2021
2122
git branch other-branch &&
2223
2324
echo "Hello" >file &&
24-
git add file &&
25-
test_tick && git commit -m "Modified file" &&
25+
echo "second" >lost &&
26+
git add file lost &&
27+
test_tick && git commit -m "Modified file and lost" &&
2628
note B &&
2729
2830
git checkout other-branch &&
2931
3032
echo "Hello" >file &&
31-
git add file &&
33+
>lost &&
34+
git add file lost &&
3235
test_tick && git commit -m "Modified the file identically" &&
3336
note C &&
3437
@@ -37,7 +40,9 @@ test_expect_success setup '
3740
test_tick && git commit -m "Add another file" &&
3841
note D &&
3942
40-
test_tick && git merge -m "merge" master &&
43+
test_tick &&
44+
test_must_fail git merge -m "merge" master &&
45+
>lost && git commit -a -m "merge" &&
4146
note E &&
4247
4348
echo "Yet another" >elif &&
@@ -110,4 +115,16 @@ check_result 'I B A' -- file
110115
check_result 'I B A' --topo-order -- file
111116
check_result 'H' --first-parent -- another-file
112117

118+
check_result 'E C B A' --full-history E -- lost
119+
test_expect_success 'full history simplification without parent' '
120+
printf "%s\n" E C B A >expect &&
121+
git log --pretty="$FMT" --full-history E -- lost |
122+
unnote >actual &&
123+
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
124+
test_cmp expect check || {
125+
cat actual
126+
false
127+
}
128+
'
129+
113130
test_done

0 commit comments

Comments
 (0)