@@ -10,6 +10,7 @@ test_expect_success 'setup' '
10
10
git commit -m one
11
11
'
12
12
13
+ commit=$( git rev-parse --short HEAD)
13
14
cat > expect << 'EOF '
14
15
Reflog: HEAD@{0} (C O Mitter <[email protected] >)
15
16
Reflog message: commit (initial): one
@@ -20,8 +21,8 @@ test_expect_success 'log -g shows reflog headers' '
20
21
test_cmp expect actual
21
22
'
22
23
23
- cat > expect << ' EOF '
24
- e46513e HEAD@{0}: commit (initial): one
24
+ cat > expect << EOF
25
+ $commit HEAD@{0}: commit (initial): one
25
26
EOF
26
27
test_expect_success ' oneline reflog format' '
27
28
git log -g -1 --oneline >actual &&
@@ -33,8 +34,8 @@ test_expect_success 'reflog default format' '
33
34
test_cmp expect actual
34
35
'
35
36
36
- cat > expect << ' EOF '
37
- commit e46513e
37
+ cat > expect << EOF
38
+ commit $commit
38
39
Reflog: HEAD@{0} (C O Mitter <[email protected] >)
39
40
Reflog message: commit (initial): one
40
41
Author: A U Thor <[email protected] >
@@ -56,8 +57,8 @@ test_expect_success 'using @{now} syntax shows reflog date (multiline)' '
56
57
test_cmp expect actual
57
58
'
58
59
59
- cat > expect << ' EOF '
60
- e46513e HEAD@{Thu Apr 7 15:13:13 2005 -0700}: commit (initial): one
60
+ cat > expect << EOF
61
+ $commit HEAD@{Thu Apr 7 15:13:13 2005 -0700}: commit (initial): one
61
62
EOF
62
63
test_expect_success ' using @{now} syntax shows reflog date (oneline)' '
63
64
git log -g -1 --oneline HEAD@{now} >actual &&
@@ -82,8 +83,8 @@ test_expect_success 'using --date= shows reflog date (multiline)' '
82
83
test_cmp expect actual
83
84
'
84
85
85
- cat > expect << ' EOF '
86
- e46513e HEAD@{Thu Apr 7 15:13:13 2005 -0700}: commit (initial): one
86
+ cat > expect << EOF
87
+ $commit HEAD@{Thu Apr 7 15:13:13 2005 -0700}: commit (initial): one
87
88
EOF
88
89
test_expect_success ' using --date= shows reflog date (oneline)' '
89
90
git log -g -1 --oneline --date=default >actual &&
@@ -109,8 +110,8 @@ test_expect_success 'log.date does not invoke "--date" magic (multiline)' '
109
110
test_cmp expect actual
110
111
'
111
112
112
- cat > expect << ' EOF '
113
- e46513e HEAD@{0}: commit (initial): one
113
+ cat > expect << EOF
114
+ $commit HEAD@{0}: commit (initial): one
114
115
EOF
115
116
test_expect_success ' log.date does not invoke "--date" magic (oneline)' '
116
117
test_config log.date raw &&
0 commit comments