summaryrefslogtreecommitdiff
path: root/t/t4205-log-pretty-formats.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-19 11:38:32 -0700
committerJunio C Hamano <gitster@pobox.com>2014-09-19 11:38:32 -0700
commitceeacc501bc64dcdff180a9250bf2fcea3582837 (patch)
tree5934e97fc45082bc333c21e7dac5ca936112306a /t/t4205-log-pretty-formats.sh
parenta60f434e20083e94a33614c36626d97be79d5dd0 (diff)
parent466fb6742d7fb7d3e6994b2d0d8db83a8786ebcf (diff)
downloadgit-ceeacc501bc64dcdff180a9250bf2fcea3582837.tar.gz
Merge branch 'bb/date-iso-strict'
"log --date=iso" uses a slight variant of ISO 8601 format that is made more human readable. A new "--date=iso-strict" option gives datetime output that is more strictly conformant. * bb/date-iso-strict: pretty: provide a strict ISO 8601 date format
Diffstat (limited to 't/t4205-log-pretty-formats.sh')
-rwxr-xr-xt/t4205-log-pretty-formats.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh
index de0cc4a0fd..9b75399572 100755
--- a/t/t4205-log-pretty-formats.sh
+++ b/t/t4205-log-pretty-formats.sh
@@ -438,6 +438,14 @@ test_expect_success 'strbuf_utf8_replace() not producing NUL' '
! grep Q actual
'
+# ISO strict date format
+test_expect_success 'ISO and ISO-strict date formats display the same values' '
+ git log --format=%ai%n%ci |
+ sed -e "s/ /T/; s/ //; s/..\$/:&/" >expected &&
+ git log --format=%aI%n%cI >actual &&
+ test_cmp expected actual
+'
+
# get new digests (with no abbreviations)
head1=$(git rev-parse --verify HEAD~0) &&
head2=$(git rev-parse --verify HEAD~1) &&