Re: [PATCH] use C99 declaration of variable in for() loop
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 15, 2024, 23:43 UTC
- Message-ID
- <xmqqa5o1mgyo.fsf@gitster.g>
- In-Reply-To
- <Zc6abO6RV9RwpABR@tapette.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 5 quoted lines
> I will also say that sending one giant patch for this may be a bit hard > to review. While I will defer to Junio's opinion as the maintainer, I > would be more inclined to review this kind of series if it came in in > smaller patches, a few at a time, in which case I would find it a > welcome improvement.
True. As to the specific topic of using "for (int i = 0; ...)", it is tedious to review for mistakes and 17000+ lines of patch is not a way to do so. I do not think I would be able to spot a change in behaviour caused by a hunk like this
int i = 3; ... after some operations ... - for (i = 0; i < 5; i++) + for (int i = 0; i < 5; i++) if (condition_on_i(i)) break; ... after some operations ... return i;
after scanning similar changes for 1000+ times in a single huge patch.