pretty: give placeholders to reflog identity

When doing a reflog walk, you can get some information about
the reflog (such as the subject line), but not the identity
information (i.e., name and email).

Let's make those available, mimicing the options for author
and committer identity.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2011-12-16 06:40:24 -05:00
committed by Junio C Hamano
parent 7b6c5836cf
commit cd1957f5fc
5 changed files with 48 additions and 0 deletions

View File

@ -267,6 +267,12 @@ test_expect_success '%gd shortens ref name' '
test_cmp expect.gd-short actual.gd-short
'
test_expect_success 'reflog identity' '
echo "C O Mitter:committer@example.com" >expect &&
git log -g -1 --format="%gn:%ge" >actual &&
test_cmp expect actual
'
test_expect_success 'oneline with empty message' '
git commit -m "dummy" --allow-empty &&
git commit -m "dummy" --allow-empty &&