aboutsummaryrefslogtreecommitdiff
path: root/t/t6006-rev-list-format.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2008-08-28 20:54:59 -0400
committerJunio C Hamano <gitster@pobox.com>2008-08-29 00:14:29 -0700
commitd36f8679e94c2a0d4d15d6adcea434634af6d627 (patch)
tree2627d520068c741d8235151da56ae66ad261ed01 /t/t6006-rev-list-format.sh
parent0cfeed2e1d320cc76c434e0bfc26d90065754e46 (diff)
downloadgit-d36f8679e94c2a0d4d15d6adcea434634af6d627.tar.gz
git-d36f8679e94c2a0d4d15d6adcea434634af6d627.tar.xz
pretty=format: respect date format options
When running a command like: git log --pretty=format:%ad --date=short the date option was ignored. This patch causes it to use whatever format was specified by --date (or by --relative-date, etc), just as the non-user formats would do. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6006-rev-list-format.sh')
-rwxr-xr-xt/t6006-rev-list-format.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
index 9176484db..485ad4d44 100755
--- a/t/t6006-rev-list-format.sh
+++ b/t/t6006-rev-list-format.sh
@@ -139,6 +139,12 @@ commit 131a310eb913d107dd3c09a65d1651175898735d
commit 86c75cfd708a0e5868dc876ed5b8bb66c80b4873
EOF
+test_expect_success '%ad respects --date=' '
+ echo 2005-04-07 >expect.ad-short &&
+ git log -1 --date=short --pretty=tformat:%ad >output.ad-short master &&
+ test_cmp expect.ad-short output.ad-short
+'
+
test_expect_success 'empty email' '
test_tick &&
C=$(GIT_AUTHOR_EMAIL= git commit-tree HEAD^{tree} </dev/null) &&