summaryrefslogtreecommitdiff
path: root/pretty.c
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 /pretty.c
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 'pretty.c')
-rw-r--r--pretty.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pretty.c b/pretty.c
index 44b9f64372..5f012a6b8e 100644
--- a/pretty.c
+++ b/pretty.c
@@ -738,9 +738,12 @@ static size_t format_person_part(struct strbuf *sb, char part,
case 'r': /* date, relative */
strbuf_addstr(sb, show_ident_date(&s, DATE_RELATIVE));
return placeholder_len;
- case 'i': /* date, ISO 8601 */
+ case 'i': /* date, ISO 8601-like */
strbuf_addstr(sb, show_ident_date(&s, DATE_ISO8601));
return placeholder_len;
+ case 'I': /* date, ISO 8601 strict */
+ strbuf_addstr(sb, show_ident_date(&s, DATE_ISO8601_STRICT));
+ return placeholder_len;
}
skip: