summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-02-07 06:05:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-02-07 06:05:24 (GMT)
commitecbe1beb8e41664ac00581234a449c4487600e1d (patch)
treed53750776f3409aa3b3646c2b4027ac487e6c70a /builtin
parent13e263095b55c88b7af86c3c88f8b0f937eb4d5c (diff)
parent110a6a161d304cac5e50306c70510f38000224bb (diff)
downloadgit-ecbe1beb8e41664ac00581234a449c4487600e1d.zip
git-ecbe1beb8e41664ac00581234a449c4487600e1d.tar.gz
git-ecbe1beb8e41664ac00581234a449c4487600e1d.tar.bz2
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 0074ed3..581de0d 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;