git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 23, 2009, 01:44 UTC
Message-ID
<7v7i3ix6yi.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20090222230620.GB19011@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 23 quoted lines
> On Fri, Feb 20, 2009 at 01:23:54PM -0800, eletuchy@gmail.com wrote:
>
>> From: Eugene Letuchy <eugene@facebook.com>
>> 
>> 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.
Previous: Jeff KingNext: Jeff King
Message 6 of 15 in “--date=relative falls back to "short" format for commits older than a year”
  1. 2/2 --date=relative falls back to "short" format for commits older than a yeareletuchy@gmail.com, Feb 20, 2009
  2. Linus TorvaldsFeb 20, 2009
  3. Eugene LetuchyFeb 20, 2009
  4. Junio C HamanoFeb 21, 2009
  5. Jeff KingFeb 22, 2009
  6. Junio C HamanoFeb 23, 2009
  7. Jeff KingFeb 23, 2009
  8. Marius Storm-OlsenFeb 23, 2009
  9. Jeff KingFeb 24, 2009
  10. Marius Storm-OlsenFeb 24, 2009
  11. Jeff KingFeb 24, 2009
  12. Junio C HamanoFeb 23, 2009
  13. Jeff KingFeb 24, 2009
  14. Junio C HamanoFeb 24, 2009
  15. Jeff KingFeb 24, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.