Re: [PATCH] git-status: Show empty directories
- From
Leila <muhtasib@gmail.com>
- Date
- Jun 9, 2012, 21:24 UTC
- Message-ID
- <CAA3EhHLzGG2pz27+_k6s92VC+u2S==ADyVMdCawES-=ZFt4fhg@mail.gmail.com>
- In-Reply-To
- <877gvgrxw7.fsf@thomas.inf.ethz.ch>
On Sat, Jun 9, 2012 at 5:14 PM, Thomas Rast <trast@student.ethz.ch> wrote:
Show 21 quoted lines
> 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$'
>I ran the command and was able to see that. Thanks Thomas. I'm fine following whichever style you guys prefer.