checkout: add missing const to describe_detached_head
[alt-git.git] / t / t1412-reflog-loop.sh
blob7f519e5ebeac0780aee1c6d9c4458e00b62a273d
1 #!/bin/sh
3 test_description='reflog walk shows repeated commits again'
4 . ./test-lib.sh
6 test_expect_success 'setup commits' '
7 test_tick &&
8 echo content >file && git add file && git commit -m one &&
9 git tag one &&
10 echo content >>file && git add file && git commit -m two &&
11 git tag two
14 test_expect_success 'setup reflog with alternating commits' '
15 git checkout -b topic &&
16 git reset one &&
17 git reset two &&
18 git reset one &&
19 git reset two
22 test_expect_success 'reflog shows all entries' '
23 cat >expect <<-\EOF
24 topic@{0} two: updating HEAD
25 topic@{1} one: updating HEAD
26 topic@{2} two: updating HEAD
27 topic@{3} one: updating HEAD
28 topic@{4} branch: Created from HEAD
29 EOF
30 git log -g --format="%gd %gs" topic >actual &&
31 test_cmp expect actual
34 test_done