From: Kristofer Karlsson Date: Sun, 08 Nov 2026 09:13:59 GMT Subject: Re: [PATCH 0/3] t: add "test-tool genbytes" to avoid slow tr(1) on macOS Message-ID: In-Reply-To: On Sun, 8 Nov 2026 at 00:23, Junio C Hamano wrote: > > "Kristofer Karlsson via GitGitGadget" > writes: > > > Open question: is patch 3 wanted? It folds "genzeros" into "genbytes", > > spelling the NUL byte as "NUL", so that there is a single command. > > I would suggest genbytes to take the value of the byte in decimal or > hex, instead of av[1][0], so that you do not have to treat NUL any > specially. I would actually think it is even better to limit the > input format only to [0-9a-f][0-9a-f], i.e., two hexadecimal digits > that does not allow uppercase to represent values 0-255 (inclusive), > without support for any other input format like decimal. > > After all, this is just a test helper, so ergonomics or flexibility > do not matter as much as simplicity. Yes, I actually had one local prototype that used this approach, but I held off on it since it would mean a semantically larger change. But I agree it would improve the ergonomics, so I can do it. And it's not too many call sites to convert anyway. Thanks, Kristofer