On 2022-03-30 at 23:05:28, Junio C Hamano wrote:
Documentation/CodingGuidelines still says this
- Declaring a variable in the for loop "for (int i = 0; i < 10; i++)"
is still not allowed in this codebase.
We have been experimenting since we merged 44ba10d6 (revision: use
C99 declaration of variable in for() loop, 2021-11-14) at 5a4069a1
(Merge branch 'jc/c99-var-decl-in-for-loop', 2021-12-21), which is
shipped as a part of v2.35.0 just a few months ago.
Let's not add more until we are sure that we do not have to revert
44ba10d6 (revision: use C99 declaration of variable in for() loop,
2021-11-14) to limit the potential damage, especially when it is so
easy to do so.
Just declare "int i" at the beginning of the funcion and keep
reusing it would be fine here.
Okay, I can reroll with that.
--
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA