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

Re: [PATCH 02/18] http-push, http-walker: style fixes

From
Junio C Hamano <gitster@pobox.com>
Date
May 24, 2009, 20:43 UTC
Message-ID
<7v7i06ut92.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20090524221941.8670c41d.rctay89@gmail.com>
Tay Ray Chuan <rctay89@gmail.com> writes:
Show 5 quoted lines
>  *spaces used as indentation have been replaced by tabs instead.
>
>  *'if' and 'while' conditionals with a single line have had their curly
>   braces removed.
>
We need to apply a style fix to your commit messages first.

Using '*' without any space as the enumeration bullet makes the message harder to read. Please don't. Also we prefer to give orders to the person who applies the patch (i.e. "do _this_, so that the result becomes better in _this_ and _that_ way"), instead of saying "I've done this and that".

	- Use tabs to indent, instead of spaces.
	- Do not use curly-braces around a single statement body in
          if/while statement; 
	- Do not start multi-line comment with description on the first
          line after "/*", i.e.
        
            /*
             * We prefer this over...
             */
            /* comments like
             * this (notice the first line)
             */

I personally do not necessarily agree with the first "clean-up", but as long as the style is internally consistent within the file that's Ok.

Previous: Tay Ray ChuanNext: Tay Ray Chuan
Message 2 of 3 in “http-push, http-walker: style fixes”
  1. 02/18 http-push, http-walker: style fixesTay Ray Chuan, May 24, 2009
  2. Junio C HamanoMay 24, 2009
  3. Tay Ray ChuanMay 25, 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.