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