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
Jeff King <peff@peff.net>
Date
Feb 24, 2009, 07:07 UTC
Message-ID
<20090224070722.GA16566@coredump.intra.peff.net>
In-Reply-To
<7v63j0mib5.fsf@gitster.siamese.dyndns.org>
On Mon, Feb 23, 2009 at 10:59:26PM -0800, Junio C Hamano wrote:
Show 5 quoted lines
> That was what I thought.  There may be some very convincing reasoning I am
> not seeing in the proposals to make it ultra-short like "Y yr M mo" or
> "Y.x years" (i.e. "we _have_ to keep it under N characters"threshold), but
> I doubt there is a particular place "Y years, M months" would make the
> output too long to be acceptable.

Yeah, anything like blame that deals with arbitrary date formats has to know how to handle at least

  strlen("Sun Feb 22 15:08:25 2009 -0500") = 30
anyway.  Even the default blame format is:
  strlen("2009-02-24 02:03:25 -0500") = 25

So "Y years, M months ago" is at least that short for the next ten thousand years. I can live with setting the cutoff to just "years" somewhere lower than 10,000. :)

-Peff
Previous: Junio C Hamano
Message 15 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.