From: Thomas Rast <trast@student.ethz.ch>
To: Leila <muhtasib@gmail.com>
Cc: <konglu@minatec.inpg.fr>, <git@vger.kernel.org>
Subject: Re: [PATCH] git-status: Show empty directories
Date: Sat, 9 Jun 2012 23:14:16 +0200 [thread overview]
Message-ID: <877gvgrxw7.fsf@thomas.inf.ethz.ch> (raw)
In-Reply-To: <CAA3EhHJ9WnisF21iFfsjQKYFSY0t0jFvNV3aBjx0eGFPm8aoGg@mail.gmail.com> (Leila's message of "Sat, 9 Jun 2012 17:08:20 -0400")
Leila <muhtasib@gmail.com> writes:
>> The structure is
>> if (...) {
>> /*code*/
>> } else {
>> /*code*/
>> }
>>
>> Do not forget braces in the "else" part as the firt block needs it.
>
> I was under the impression that one liners didn't require parenthesis
> according to the style guidelines. I didn't realize that if the 'if'
> required it, then the else required it. I will make that change and
> remember it for the future. Thanks!
It's not required, there's plenty of precedent, even one case within
wt-status.c, of '} else'. Try running
git grep '} else$'
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2012-06-09 21:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-09 19:40 [PATCH] git-status: Show empty directories Leila Muhtasib
2012-06-09 20:13 ` konglu
2012-06-09 21:08 ` Leila
2012-06-09 21:14 ` Thomas Rast [this message]
2012-06-09 21:24 ` Leila
2012-06-09 21:47 ` konglu
2012-06-10 9:01 ` Thomas Rast
2012-06-10 9:46 ` konglu
2012-06-10 14:20 ` Leila
2012-06-11 15:08 ` Junio C Hamano
2012-06-10 7:15 ` Junio C Hamano
2012-06-10 16:02 ` Leila
2012-06-10 18:12 ` konglu
2012-06-10 18:17 ` Leila
2012-06-11 16:57 ` Junio C Hamano
2012-06-11 18:51 ` Leila
2012-06-11 19:00 ` Leila
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877gvgrxw7.fsf@thomas.inf.ethz.ch \
--to=trast@student.ethz.ch \
--cc=git@vger.kernel.org \
--cc=konglu@minatec.inpg.fr \
--cc=muhtasib@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).