From: Junio C Hamano Date: Fri, 19 Sep 2014 18:38:32 +0000 (-0700) Subject: Merge branch 'bb/date-iso-strict' X-Git-Tag: v2.2.0-rc0~120 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ceeacc501bc64dcdff180a9250bf2fcea3582837 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 --- ceeacc501bc64dcdff180a9250bf2fcea3582837 diff --cc t/t4205-log-pretty-formats.sh index de0cc4a0fd,f2f748399d..9b75399572 --- a/t/t4205-log-pretty-formats.sh +++ b/t/t4205-log-pretty-formats.sh @@@ -431,13 -431,14 +431,21 @@@ EO test_cmp expected actual ' +test_expect_success 'strbuf_utf8_replace() not producing NUL' ' + git log --color --pretty="tformat:%<(10,trunc)%s%>>(10,ltrunc)%C(auto)%d" | + test_decode_color | + nul_to_q >actual && + ! 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) &&