@@ -14,21 +14,24 @@ unnote () {
14
14
15
15
test_expect_success setup '
16
16
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" &&
19
20
note A &&
20
21
21
22
git branch other-branch &&
22
23
23
24
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" &&
26
28
note B &&
27
29
28
30
git checkout other-branch &&
29
31
30
32
echo "Hello" >file &&
31
- git add file &&
33
+ >lost &&
34
+ git add file lost &&
32
35
test_tick && git commit -m "Modified the file identically" &&
33
36
note C &&
34
37
@@ -37,7 +40,9 @@ test_expect_success setup '
37
40
test_tick && git commit -m "Add another file" &&
38
41
note D &&
39
42
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" &&
41
46
note E &&
42
47
43
48
echo "Yet another" >elif &&
@@ -110,4 +115,16 @@ check_result 'I B A' -- file
110
115
check_result ' I B A' --topo-order -- file
111
116
check_result ' H' --first-parent -- another-file
112
117
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
+
113
130
test_done
0 commit comments