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
Marius Storm-Olsen <marius@trolltech.com>
Date
Feb 23, 2009, 08:09 UTC
Message-ID
<49A2599E.2030406@trolltech.com>
In-Reply-To
<20090223031631.GC22348@coredump.intra.peff.net>
Jeff King said the following on 23.02.2009 04:16:
Show 23 quoted lines
> On Sun, Feb 22, 2009 at 05:44:37PM -0800, Junio C Hamano wrote:
>>> +		/* Otherwise, years. Centuries is probably overkill. */
>>> +		snprintf(timebuf, sizeof(timebuf), "%lu years ago", (diff + 183) / 365);
>>> +		return timebuf;
>> 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.
> 
> I thought about that, but I wanted to keep the maximum size down
> for column output (like in git-blame). Which is why I bumped the
> "use months" limit to 24 months instead of 12.
> 
> And that limit can also be tweaked.  Surely at some point there is
> a range where you no longer care about the months and "N years" has
> high enough resolution. But there is also a point where "N months"
> gets cumbersome (75 months is a more annoying than "around 6
> years"). The question is whether we reach the "cumbersome" point
> before we reach the "don't care about months" point.
> 
> Another option would to give higher resolution in number of years,
> like "3.5 years" or even "3.1 years".
And using shorter names for the units would be a no-go?
   "3y 2m ago"    <--
   "3 years ago"
   "3 months ago"
   "3 weeks ago"
   "3 days ago"
   "3 hours ago"
   "3 mins ago"   <--
   "3 secs ago"   <--
-- 
.marius [@trolltech.com]
'if you know what you're doing, it's not research'
Previous: Jeff KingNext: Jeff King
Message 8 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.