Re: orthogonal cases of log --date option
- From
Jay Soffian <jaysoffian@gmail.com>
- Date
- Mar 5, 2009, 21:04 UTC
- Message-ID
- <76718490903051304j6d8138f7qa5492ac15edd6460@mail.gmail.com>
- In-Reply-To
- <20090305104304.GA17760@coredump.intra.peff.net>
On Thu, Mar 5, 2009 at 5:43 AM, Jeff King <peff@peff.net> wrote:
Show 20 quoted lines
>> 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.
I started to pick this up and I want to clarify what you meant by interface. Was it the CLI you had an issue with? Because that I understand and it's easy to support the CLI changes you outline above.
Or did you have a problem with how Junio was going about passing along both bits (i.e. 1. date format; 2. local or not) in an enum? Because I have to tell you, I started looking at what it would take to switch the enum to something like:
struct date_mode {
enum {
DATE_NORMAL = 0,
DATE_RELATIVE,
DATE_SHORT,
DATE_ISO8601,
DATE_RFC2822,
DATE_RAW
} format;
unsigned int local;
};It's a significantly more invasive change.
j.