Re: orthogonal cases of log --date option

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

 



On Tue, Mar 03, 2009 at 12:45:37AM -0800, Junio C Hamano wrote:

> Miles Bader <miles@xxxxxxx> writes:
> 
> > I can use "git log --date=iso" to get YYYY-MM-DD format for dates, or
> > "git log --date=local" to force the dates to use my local time zone, but
> > if I use _both_ of these options together, it uses only the last one,
> > and ignores any preceding --date (even those in this case, the two
> > --date options affect orthogonal properties of dates).  Is there a way
> > to get YYYY-MM-DD format dates, but in my local time-zone?
> 
> No, there isn't.
> 
> But this patch may help you get started.

FWIW, I think this is the wrong direction. You are working around the
lack of orthogonality in the interface by tweaking things in the
implementation. I think you are better to fix the interface, but support
--date=local for historical reasons. IOW,

  git log --local-dates --date=short

with

  git log --date=local

as a historical synonym for

  git log --local-dates --date=default

This makes the interface simpler to understand: --date remains a
selector, and --date=local is a special case that new people don't need
to think about or understand.

-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]

  Powered by Linux