Re: [PATCH 1/3] send-pack: track errors for each ref

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 17, 2007 at 05:21:59PM -0800, Junio C Hamano wrote:

> > Sorry, I don't see the style nit you're mentioning here.
> 
> I think Daniel is referring to "Put 'else' on the same line as
> the brace that closes the corresponding 'if' opened", iow:
> 
> 	if (...) {
>         	...
> 	} else {
> 		...
> 	}

Ah. We are really inconsistent about that (I count about 333 non-cuddled
(but possible to cuddle) versus 499 cuddled). Should we put something in
the CodingGuidelines? I am also happy to roll this change into a style
patch.

For reference, I counted with:

# cuddled:
grep '} *else' *.c | wc -l

# possible but non-cuddled
# when we find an 'else', if the previous line had a '}'
# on it, then it is a hit. There are a few false positives
# when the "} else" is from an outer block scope
# And no, this sed invocation probably isn't totally portable. :)
sed -n '/else/{x; /}/{x;p}}; h' *.c | wc -l
# or to check the accuracy
sed -n '/else/{x; /}/{p;x;p}}; h' *.c

-Peff
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux