]>
Commit | Line | Data |
---|---|---|
ffa1eeae JK |
1 | #!/bin/sh |
2 | ||
3 | test_description='reflog walk shows repeated commits again' | |
81ffbf83 ÆAB |
4 | |
5 | TEST_PASSES_SANITIZE_LEAK=true | |
ffa1eeae JK |
6 | . ./test-lib.sh |
7 | ||
8 | test_expect_success 'setup commits' ' | |
f5d79bf7 ÆAB |
9 | test_commit one file content && |
10 | test_commit --append two file content | |
ffa1eeae JK |
11 | ' |
12 | ||
13 | test_expect_success 'setup reflog with alternating commits' ' | |
14 | git checkout -b topic && | |
15 | git reset one && | |
16 | git reset two && | |
17 | git reset one && | |
18 | git reset two | |
19 | ' | |
20 | ||
21 | test_expect_success 'reflog shows all entries' ' | |
02380389 | 22 | cat >expect <<-\EOF && |
d04520e3 JK |
23 | topic@{0} reset: moving to two |
24 | topic@{1} reset: moving to one | |
25 | topic@{2} reset: moving to two | |
26 | topic@{3} reset: moving to one | |
ffa1eeae JK |
27 | topic@{4} branch: Created from HEAD |
28 | EOF | |
29 | git log -g --format="%gd %gs" topic >actual && | |
30 | test_cmp expect actual | |
31 | ' | |
32 | ||
33 | test_done |