From f7ab5c793707082d41e19093f536cdc0d45d8830 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 6 Jan 2008 04:21:07 -0800 Subject: custom pretty format: tolerate empty e-mail address When e-mail address is empty (e.g. "A U Thor <>"), --pretty=format misparsed the commit header and did not pick up the date field correctly. Noticed by Marco, fixed slightly differently with additional sanity check and with a test. Signed-off-by: Junio C Hamano --- t/t6006-rev-list-format.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 't/t6006-rev-list-format.sh') diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh index 1e4541afea..0dc915ea67 100755 --- a/t/t6006-rev-list-format.sh +++ b/t/t6006-rev-list-format.sh @@ -139,4 +139,14 @@ commit 131a310eb913d107dd3c09a65d1651175898735d commit 86c75cfd708a0e5868dc876ed5b8bb66c80b4873 EOF +test_expect_success 'empty email' ' + test_tick && + C=$(GIT_AUTHOR_EMAIL= git commit-tree HEAD^{tree} failure + false + } +' + test_done -- cgit v1.2.1