Thread (1 message) 1 message, 1 author, 2024-02-15

Re: [PATCH] use C99 declaration of variable in for() loop

From: Junio C Hamano <hidden>
Date: 2024-02-15 23:43:33

"brian m. carlson" [off-list ref] writes:
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help