git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: orthogonal cases of log --date option

From
Jeff King <peff@peff.net>
Date
Mar 5, 2009, 21:11 UTC
Message-ID
<20090305211120.GB20157@coredump.intra.peff.net>
In-Reply-To
<76718490903051304j6d8138f7qa5492ac15edd6460@mail.gmail.com>
On Thu, Mar 05, 2009 at 04:04:44PM -0500, Jay Soffian wrote:
Show 7 quoted lines
> > 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.
I meant the CLI.
> 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:

I find that a bit confusing, too, but at least it is not something users see. So I don't feel as strongly about it.

Show 13 quoted lines
> 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.

Yep, it is more invasive. But I consider it more maintainable in the long run.

-Peff
Previous: Jay SoffianNext: Junio C Hamano
Message 6 of 17 in “orthogonal cases of log --date option”
  1. Miles BaderMar 3, 2009
  2. Jeff KingMar 3, 2009
  3. Junio C HamanoMar 3, 2009
  4. Jeff KingMar 5, 2009
  5. Jay SoffianMar 5, 2009
  6. Jeff KingMar 5, 2009
  7. Junio C HamanoMar 5, 2009
  8. Jeff KingMar 6, 2009
  9. Junio C HamanoMar 6, 2009
  10. Jay SoffianMar 6, 2009
  11. Junio C HamanoMar 6, 2009
  12. Jay SoffianMar 6, 2009
  13. Junio C HamanoMar 6, 2009
  14. Jeff KingMar 6, 2009
  15. Jeff KingMar 6, 2009
  16. Jeff KingMar 6, 2009
  17. Miles BaderMar 6, 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.