From: Derrick Stolee Date: Fri, 28 Aug 2020 19:03:09 GMT Subject: Re: [PATCH] midx: traverse the local MIDX first Message-ID: <80ba7515-dc6c-3acd-4b53-c60cbdab1633@gmail.com> In-Reply-To: <20200828185531.GB2171353@coredump.intra.peff.net> On 8/28/2020 2:55 PM, Jeff King wrote: > On Fri, Aug 28, 2020 at 02:50:39PM -0400, Jeff King wrote: > >> So I'd be tempted to say that the latter callers should be using a >> separate function that gives them what they want. That lets them avoid >> being too intimate with the details of how we order things. >> >> The patch below illustrates that. It also changes the existing function >> name to avoid confusion and to help audit the existing callers, but >> that's optional and maybe not worth it. > > And here's the same concept as a more minimal change, suitable for > squashing into yours. The advantage is that it keeps the "the local one > goes first" logic in one abstracted spot. This is nice because it is more future-proof: if we needed to change the order of the midx list, then we could update the implementation of this method instead of every caller. Personally, I prefer this one (squashed). Thanks, -Stolee