Re: [PATCH] use C99 declaration of variable in for() loop
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Feb 15, 2024, 18:17 UTC
- Message-ID
- <CAP8UFD2hHYeUxtXm1tNDe3tpBAif7amLbkTQpurp3w1n7uO+HQ@mail.gmail.com>
- In-Reply-To
- <xmqqcysxskd9.fsf@gitster.g>
On Thu, Feb 15, 2024 at 6:33 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> > Elia Pinto <gitter.spiros@gmail.com> writes: > > > With the exception of cbtree.c, which would need initial > > reworking to remove the usage of goto, it expands the > > use of variable scope reduction in for loops as > > permitted by the C99 standard, which was first introduced > > in the git codebase with commit 44ba10d6. > > Thanks, but ... > > Our test balloon may have proven that nobody will be inconvenienced, > and it does mean we can be liberal using it when we add new code or > update existing loops "while at it", but I personally do not think > such a code churn is very welcome.
Perhaps such changes could be accepted when they are made in only one file as part of a microproject though?