]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'bb/date-iso-strict'
authorJunio C Hamano <gitster@pobox.com>
Fri, 19 Sep 2014 18:38:32 +0000 (11:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Sep 2014 18:38:32 +0000 (11:38 -0700)
"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

1  2 
Documentation/pretty-formats.txt
builtin/blame.c
cache.h
pretty.c
t/t4205-log-pretty-formats.sh

Simple merge
diff --cc builtin/blame.c
Simple merge
diff --cc cache.h
Simple merge
diff --cc pretty.c
Simple merge
index de0cc4a0fd5fe37bb36a3268182d95de3589f4b4,f2f748399d4b3066ef3cf16ae28ec99e698e1d72..9b75399572b1cbe1bfcb00995e1660a93fe6a4c6
@@@ -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) &&