Jeff King <peff@xxxxxxxx> writes: >> > + uint32_t commit_count = 0, >> > + tag_count = 0, >> > + tree_count = 0, >> > + blob_count = 0; >> >> Hmm, I don't usually see the comma-separated declaration/initialization >> in git.git. Is there a reason you did it here? Not that I really mind >> one way or the other, just interested. > > The variables are all related, and all should have the same type. I'd > complain about a patch that did: > > int ret, count; > > because there's no logical reason those two variables have the same > type. They just happen to. And putting them both on the same line is > even worse, because it makes a diff changing one of them noisy. > > But in the code quoted above, if one of them changes, they would all > (presumably) change. So I think it communicates something to group them > like this. I often apply exactly the same criteria as above to my code and review---since it is not just you (or me), perhaps CodingGuideline can help other readers, but I am OK to delay documenting it until we find the third person who has been applying this rule that has not been spelt out explicitly ;-)