Thread (8 messages) flat view 8 messages, 3 authors, 2016-06-15

Re: [PATCH 2/2] --date=relative falls back to "short" format for commits older than a year

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:16

Possibly related (same subject, not in this thread)

Jeff King [off-list ref] writes:
On Fri, Feb 20, 2009 at 01:23:54PM -0800, eletuchy@gmail.com wrote:
quoted
From: Eugene Letuchy <redacted>

In the context of sizing the git blame time column, it doesn't make a
lot of sense to see "12 months ago" next to an exact timestamp +
timezone for something 13 months ago. This commit makes commits older
than 12 months display the date only, not the time.
I think this is an improvement, though I was thinking of taking it a
step further:
...
+		/* Otherwise, years. Centuries is probably overkill. */
+		snprintf(timebuf, sizeof(timebuf), "%lu years ago", (diff + 183) / 365);
+		return timebuf;
 	}
 
 	if (mode == DATE_LOCAL)


but maybe other people actually like seeing the absolute time. I've
always found it jarring when reading relative times (but part of that
_was_ because it was so long and exact).
I agree this is an improvement.  It irritated me, too.  And I do not think
this change falls into the category of bad backward incompatibility.

I was hoping somebody would do a "N years M months", though.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help