diff options
author | ZheNing Hu <adlternative@gmail.com> | 2021-04-25 10:41:45 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-04-27 16:09:32 +0900 |
commit | b722d4560e9d566cb8c6cdccf08d649df146eb6b (patch) | |
tree | 139de3aa4d73b836143c553ee3b1c7a51684e90e /t/t4205-log-pretty-formats.sh | |
parent | pretty tests: give --date/format tests a better description (diff) | |
download | tgif-b722d4560e9d566cb8c6cdccf08d649df146eb6b.tar.xz |
pretty: provide human date format
Add the placeholders %ah and %ch to format author date and committer
date, like --date=human does, which provides more humanity date output.
Signed-off-by: ZheNing Hu <adlternative@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4205-log-pretty-formats.sh')
-rwxr-xr-x | t/t4205-log-pretty-formats.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh index bcb558ef4d..8272d94ce6 100755 --- a/t/t4205-log-pretty-formats.sh +++ b/t/t4205-log-pretty-formats.sh @@ -538,6 +538,12 @@ test_expect_success '--date=short %ad%cd is the same as %as%cs' ' test_cmp expected actual ' +test_expect_success '--date=human %ad%cd is the same as %ah%ch' ' + git log --format=%ad%n%cd --date=human >expected && + git log --format=%ah%n%ch >actual && + test_cmp expected actual +' + # get new digests (with no abbreviations) test_expect_success 'set up log decoration tests' ' head1=$(git rev-parse --verify HEAD~0) && |