Skip to content

Commit

Permalink
t/t1411: test reflog with formats
Browse files Browse the repository at this point in the history
"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 <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael J Gruber authored and Junio C Hamano committed Apr 1, 2011
1 parent ef803fd commit 21d2616
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions t/t1411-reflog-show.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,24 @@ test_expect_success 'oneline reflog format' '
test_cmp expect actual
'

test_expect_success 'reflog default format' '
git reflog -1 >actual &&
test_cmp expect actual
'

cat >expect <<'EOF'
commit e46513e
Reflog: HEAD@{0} (C O Mitter <committer@example.com>)
Reflog message: commit (initial): one
Author: A U Thor <author@example.com>
one
EOF
test_expect_failure 'override reflog default format' '
git reflog --format=short -1 >actual &&
test_cmp expect actual
'

cat >expect <<'EOF'
Reflog: HEAD@{Thu Apr 7 15:13:13 2005 -0700} (C O Mitter <committer@example.com>)
Reflog message: commit (initial): one
Expand Down

0 comments on commit 21d2616

Please sign in to comment.