summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-02-06 22:05:24 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-02-06 22:05:24 -0800
commitecbe1beb8e41664ac00581234a449c4487600e1d (patch)
treed53750776f3409aa3b3646c2b4027ac487e6c70a /builtin
parentMerge branch 'jk/autocrlf-overrides-eol-doc' (diff)
parentAdd `human` date format tests. (diff)
downloadtgif-ecbe1beb8e41664ac00581234a449c4487600e1d.tar.xz
Merge branch 'lt/date-human'
A new date format "--date=human" that morphs its output depending on how far the time is from the current time has been introduced. "--date=auto" can be used to use this new format when the output is going to the pager or to the terminal and otherwise the default format. * lt/date-human: Add `human` date format tests. Add `human` format to test-tool Add 'human' date format documentation Replace the proposed 'auto' mode with 'auto:' Add 'human' date format
Diffstat (limited to 'builtin')
-rw-r--r--builtin/blame.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/blame.c b/builtin/blame.c
index 0074ed311c..581de0d832 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -925,6 +925,10 @@ parse_done:
*/
blame_date_width = utf8_strwidth(_("4 years, 11 months ago")) + 1; /* add the null */
break;
+ case DATE_HUMAN:
+ /* If the year is shown, no time is shown */
+ blame_date_width = sizeof("Thu Oct 19 16:00");
+ break;
case DATE_NORMAL:
blame_date_width = sizeof("Thu Oct 19 16:00:04 2006 -0700");
break;