summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-09-19 11:38:32 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-09-19 11:38:32 -0700
commitceeacc501bc64dcdff180a9250bf2fcea3582837 (patch)
tree5934e97fc45082bc333c21e7dac5ca936112306a /t
parentMerge branch 'mb/build-contrib-svn-fe' (diff)
parentpretty: provide a strict ISO 8601 date format (diff)
downloadtgif-ceeacc501bc64dcdff180a9250bf2fcea3582837.tar.xz
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')
-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) &&