Re: [PATCH v3 2/2] blame: use a helper to get suitable blame_date_width

2014-04-22 Thread Jiang Xin
2014-04-22 3:19 GMT+08:00 Junio C Hamano gits...@pobox.com: Junio C Hamano gits...@pobox.com writes: What I am wondering is if we can do something like this: ... Nah, that is a lot more stupid than just doing In code: blame_date_width = strtoul(_(4 years, 11 months ago),

[PATCH v3 2/2] blame: use a helper to get suitable blame_date_width

2014-04-21 Thread Jiang Xin
When show date in relative date format for git-blame, the max display width of datetime is set as the length of the string Thu Oct 19 16:00:04 2006 -0700 (30 characters long). But actually the max width for C locale is only 22 (the length of string x years, xx months ago). And for other locale,

Re: [PATCH v3 2/2] blame: use a helper to get suitable blame_date_width

2014-04-21 Thread Junio C Hamano
Jiang Xin worldhello@gmail.com writes: When show date in relative date format for git-blame, the max display width of datetime is set as the length of the string Thu Oct 19 16:00:04 2006 -0700 (30 characters long). But actually the max width for C locale is only 22 (the length of string

Re: [PATCH v3 2/2] blame: use a helper to get suitable blame_date_width

2014-04-21 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: What I am wondering is if we can do something like this: ... Nah, that is a lot more stupid than just doing In code: blame_date_width = strtoul(_(4 years, 11 months ago), NULL, 10) + 1; In git.pot: #. This string is used