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

Re: [RFC] Colorize 'commit' lines in log ui

From
Jeff King <peff@peff.net>
Date
Jul 23, 2006, 22:01 UTC
Message-ID
<20060723220133.GA26390@coredump.intra.peff.net>
In-Reply-To
<20060723112422.GB27825@lug-owl.de>
On Sun, Jul 23, 2006 at 01:24:22PM +0200, Jan-Benedict Glaw wrote:
> If people only were used to *always* place a comma behind the last
> array element, the diff would be shorter by one line each time...

I agree that it's much more convenient; I left it off because it wasn't there before and I thought there were some standardization issues.

As it turns out, the situation is quite ridiculous. C89 allowed trailing commas in initialization lists but not in enums. Most compilers (gcc, sun) accepted it anyway, but some (aix xlc) did not.

Do we care? I think probably not, since the color_diff enum already had a trailing comma. It seems like the primary non-gcc compiler that has been mentioned is sun cc. I don't know what other compilers are being used to compile git.

-Peff
Previous: Jan-Benedict GlawNext: Junio C Hamano
Message 3 of 4 in “[RFC] Colorize 'commit' lines in log ui”
  1. Jeff KingJul 23, 2006
  2. Jan-Benedict GlawJul 23, 2006
  3. Jeff KingJul 23, 2006
  4. Junio C HamanoJul 24, 2006

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.