From: D. Ben Knoble Date: Thu, 15 Oct 2026 19:04:52 GMT Subject: Re: [PATCH] refs: fix loose-ref seeking across directory boundaries Message-ID: In-Reply-To: [resending with corrected plain-text ':D] > On Thu, 15 Oct 2026 at 10:38 PM, D. Ben Knoble wrote: >> >> On Thu, Oct 15, 2026 at 10:20 AM Harald Nordgren >> wrote: >> [snip] >> > > + if test "$storage" = mixed >> > > + then >> > > + git pack-refs --all || return 1 >> > > + fi && >> > >> > I don't see any reason why a test would need an if block, we know what data we >> > expect, no? >> >> I didn't examine too closely, but this test is wrapped in a loop over >> the storage variable that appears to determine whether and when we >> pack-refs, so I think the conditional makes sense for that? On Thu, Oct 15, 2026 at 1:13 PM Venkat Ragavan wrote: > > Yes it does, I interpreted Harald’s suggestion was to write separate tests instead of looping over a variable outside the test block, either ways the logic of the test is going to remain the same. [we bottom-post here] I don’t mind the loop, personally; it might be worth looking around for other tests and see how they approach it. You can also extract shared sections into functions if that makes writing separate tests easier. -- D. Ben Knoble