Re: [PATCH 0/9] new git check-ignore sub-command
- From
Adam Spiers <git@adamspiers.org>
- Date
- Sep 7, 2012, 10:03 UTC
- Message-ID
- <CAOkDyE8mEQ5XkH5TBsrVkAZOqoT+DVoggeGawH=cqU6E6=hv=g@mail.gmail.com>
- In-Reply-To
- <7v7gscgnnr.fsf@alter.siamese.dyndns.org>
On Sun, Sep 2, 2012 at 9:35 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> * avoid unnnecessary braces {} around single statement blocks, e.g.
>
> -if (exclude) {
> +if (exclude)
> return exclude;
> -}
>
> * else should follow close brace '}' of if clause, e.g.
>
> if (...) {
> ...
> -}
> -else {
> +} else {
> ...What about when the if clause requires braces but the else clause doesn't? Should it be
if (...) {
...;
...;
} else
...;or
if (...) {
...;
...;
}
else
...;?