Skip to content

Commit 21d2616

Browse files
Michael J Grubergitster
authored andcommitted
t/t1411: test reflog with formats
"git reflog --format=short" does not work because "reflog" overrides the format option. This is documented in code. Document this by a test (known failure) also. Signed-off-by: Michael J Gruber <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ef803fd commit 21d2616

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

t/t1411-reflog-show.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,24 @@ test_expect_success 'oneline reflog format' '
2828
test_cmp expect actual
2929
'
3030

31+
test_expect_success 'reflog default format' '
32+
git reflog -1 >actual &&
33+
test_cmp expect actual
34+
'
35+
36+
cat >expect <<'EOF'
37+
commit e46513e
38+
Reflog: HEAD@{0} (C O Mitter <[email protected]>)
39+
Reflog message: commit (initial): one
40+
Author: A U Thor <[email protected]>
41+
42+
one
43+
EOF
44+
test_expect_failure 'override reflog default format' '
45+
git reflog --format=short -1 >actual &&
46+
test_cmp expect actual
47+
'
48+
3149
cat >expect <<'EOF'
3250
Reflog: HEAD@{Thu Apr 7 15:13:13 2005 -0700} (C O Mitter <[email protected]>)
3351
Reflog message: commit (initial): one

0 commit comments

Comments
 (0)