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/