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

Re: [PATCH] wt-status.c: Increase readability.

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Apr 26, 2011, 07:50 UTC
Message-ID
<vpqaafd8n9g.fsf@bauges.imag.fr>
In-Reply-To
<1303801713-22639-1-git-send-email-henrik@fiktivkod.org>
Henrik Hautakoski <henrik@fiktivkod.org> writes:
> Subject: [PATCH] wt-status.c: Increase readability.

Maybe "increase code readability" instead, I originally thought you wanted to increase the readability of the output.

> Add braces to if/else statements to make the code more readable.

Git's coding style usually do not use "useless" braces. I think you're only adding some in if statements that already had one branch (then or else) braced, which is OK, but you should state that in the commit message.

I don't care much either way about the application of this patch, but expect others to say "this is useless code churn, not worth the trouble".

Show 6 quoted lines
> -	} else if (s->commitable)
> +	} else if (s->commitable) {
>  		status_printf_ln(s, GIT_COLOR_NORMAL, _("Untracked files not listed%s"),
>  			advice_status_hints
>  			? _(" (use -u option to show untracked files)") : "");
> +    }
Whitespace damage on the last }.
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Henrik HautakoskiNext: Henrik Hautakoski
Message 2 of 3 in “wt-status.c: Increase readability.”
  1. wt-status.c: Increase readability.Henrik Hautakoski, Apr 26, 2011
  2. Matthieu MoyApr 26, 2011
  3. Henrik HautakoskiApr 26, 2011

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.