Re: [PATCH v2 1/2] t: add "test-tool genbytes" to avoid slow tr(1) on macOS
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 9, 2026, 15:41 UTC
- Message-ID
- <xmqqh5hq106x.fsf@gitster.g>
- In-Reply-To
- <CAL71e4PkS0dRvqSkL81hSPO3M3K2n5ZTumFNvCx9MsBsFKbnmw@mail.gmail.com>
Kristofer Karlsson <krka@spotify.com> writes:
Show 17 quoted lines
> 2. remove static and keep the size. Since the stack is not > complex or deep here it should be safe. It would break > on platforms with a very small stack, but since it's only > use by CI and developers any breakage would be immediately > obvious and easy to fix. > > 3. remove static and shrink the buffer size. From my (limited) > local experiment, it seems the buffer is larger than needed. > We could shrink it without losing performance. > > I don't have a strong opinion here; I went with (2) because it > seemed like the smallest change but I'd be happy to change it. > > If we go with static, I'd prefer to have a small comment > above the function definition: > > /* not thread-safe (due to the mutable static 'buf') */
I do not think such a comment is not warranted in this case, though. After all this is more or less throw-away code used only by CI and developers ;-)