Re: RFC: dynamic "auto" date formats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 26, 2016 at 08:36:57PM -0700, Linus Torvalds wrote:

> Note that this doesn't add any gitconfig setting to do this, which
> would be part of the whole point if this is actually sensible. But I'm
> not entirely convinced it's worth it in the first place, thus this
> email to see how people react ("That's just stupid" vs "yeah, I didn't
> even know I wanted it, but now I need it").
> 
> And no, I'm not at all sure that the 24-hour cut-off is the right
> thing, but it didn't seem completely crazy either. I tend to like the
> relative date format when it is "19 minutes ago" vs "2 hours ago", at
> some point it's long enough ago that it's more useful to know "Tuesday
> at 3pm" than about how long ago it was.

Seems like a reasonable idea, though I doubt I'd use it myself. In
addition to possibly making the cutoff-time configurable, I'd expect
people would want the fallback format to be configurable, too.

I wonder if something like:

  --date=relative:24h:iso

would make sense as "relative up to 24 hours, then iso". You could even
chain them, so your:

> (And yes, it would be even better to have the "short term relative
> date" turn into a "medium-term 'day of the week at time x'" and then
> turn into "full date" when it's more than a week ago, but this patch
> only has the two modes of "short term" and "long term" and nothing in
> between).

could be something like:

  --date=relative:24h:short:1w:normal

(where "short" actually kind of sucks; we'd introduce a new format for
your "Tuesday at 10pm" output).

I admit it's a bit baroque to look at, though.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]