t/t8*: avoid redundant use of cat
[git.git] / t / t1412-reflog-loop.sh
blobff30874f940439fe979e3857400c54b944194dcb
1 #!/bin/sh
3 test_description='reflog walk shows repeated commits again'
5 TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
8 test_expect_success 'setup commits' '
9 test_commit one file content &&
10 test_commit --append two file content
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
21 test_expect_success 'reflog shows all entries' '
22 cat >expect <<-\EOF &&
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
27 topic@{4} branch: Created from HEAD
28 EOF
29 git log -g --format="%gd %gs" topic >actual &&
30 test_cmp expect actual
33 test_done