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

Re: [PATCH v5 4/9] status: collect per-file data for --porcelain=v2

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 8, 2016, 01:57 UTC
Message-ID
<xmqqy448ggyv.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160807222903.GA462@starla>
Eric Wong <e@80x24.org> writes:
Show 19 quoted lines
>> > Not a big deal (no need to resend for this one alone), but let's
>> > make the above properly formatted, i.e.
>> > 
>> > 		if (ce_stage(ce)) {
>> >                 	...
>> > 		} else {
>> >                 	...
>> > 		}                        
>> 
>> Do I understand correctly that your objections is against having the curly
>> brace before the "else" on its own line?
>> 
>> If so, when did our coding style change? I vividly remember that we
>> strongly favored putting the "else" on a new line after a closing brace,
>> to make diffs nicer in case the braces were removed or added.
>
> AFAIK, Linux kernel CodingStyle has always been what Junio
> suggested (just w/o the trailing spaces :),
> and we inherit from that.
What Eric said.

While I admit that I sometimes break line between "}" and "else {" by inertia when I am being careless and get caught by checkpatch.pl myself, I do not recall trying to justify it; you probably may remember somebody else saying that, but I don't recall anybody making that argument on the list, and more importantly I don't recall us making that our style based on that argument.

The only two and half kinds of warnings we knowingly ignore from scripts/checkpatch.pl in the Linux kernel source tree are:

 * "Avoid typedefs."  We do avoid making graduitous use of typedef to
   hide a structure behind a type and pretty much limit ourselves to
   use it for (callback) function types, though.
 * "We've never heard of Helped-by/Mentored-by footers"; well,
   kernel folks may not, but we have ;-)
 * "No spaces for bitfield width".  This may not be justifyable, but
   the majority of our bitfield widths are defined in the way not
   blessed by checkpatch.pl checker.
Previous: Eric WongNext: Jeff Hostetler
Message 17 of 19 in “status: V2 porcelain status”
  1. 0/9 status: V2 porcelain statusJeff Hostetler, Aug 5, 2016
  2. 2/9 status: cleanup API to wt_status_printJeff Hostetler, Aug 5, 2016
  3. 8/9 test-lib-functions.sh: Add lf_to_nulJeff Hostetler, Aug 5, 2016
  4. 6/9 status: print branch info with --porcelain=v2 --branchJeff Hostetler, Aug 5, 2016
  5. 9/9 status: unit tests for --porcelain=v2Jeff Hostetler, Aug 5, 2016
  6. Junio C HamanoAug 8, 2016
  7. Jeff HostetlerAug 10, 2016
  8. Junio C HamanoAug 10, 2016
  9. Jeff HostetlerAug 10, 2016
  10. 7/9 git-status.txt: describe --porcelain=v2 formatJeff Hostetler, Aug 5, 2016
  11. 3/9 status: support --porcelain[=<version>]Jeff Hostetler, Aug 5, 2016
  12. 1/9 status: rename long-format print routinesJeff Hostetler, Aug 5, 2016
  13. 4/9 status: collect per-file data for --porcelain=v2Jeff Hostetler, Aug 5, 2016
  14. Junio C HamanoAug 5, 2016
  15. Johannes SchindelinAug 7, 2016
  16. Eric WongAug 7, 2016
  17. Junio C HamanoAug 8, 2016
  18. 5/9 status: print per-file porcelain v2 status dataJeff Hostetler, Aug 5, 2016
  19. Junio C HamanoAug 5, 2016

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.