Re: [PATCH] git-status: Show empty directories

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] git-status: Show empty directories

From: Thomas Rast <hidden>
Date: 2016-06-15 22:54:01

Leila [off-list ref] writes:
quoted
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

Re: [PATCH] git-status: Show empty directories

From: Leila <hidden>
Date: 2016-06-15 22:54:01

On Sat, Jun 9, 2012 at 5:14 PM, Thomas Rast [off-list ref] wrote:
Leila [off-list ref] writes:
quoted
quoted
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.

Re: [PATCH] git-status: Show empty directories

From: <hidden>
Date: 2016-06-15 22:54:01

Thomas Rast [off-list ref] a écrit :
Leila [off-list ref] writes:
quoted
quoted
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$'
It's not because "there's plenty of precedent" that we should not try
to improve the format of the code. That's why there're coding style
rules so that we can keep the improvements consistent.

Thanks.

Lucien Kong
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help