From: Yann Dirson Date: Tue, 16 Nov 2010 22:04:18 GMT Subject: Re: [PATCH v3 1/3] Introduce sorted-array binary-search function. Message-ID: <20101116220418.GA3187@home.lan> In-Reply-To: <7vy68ti3gr.fsf@alter.siamese.dyndns.org> On Tue, Nov 16, 2010 at 09:27:16AM -0800, Junio C Hamano wrote: > Yann Dirson writes: > > > We use a cpp-based template mechanism to declare the array and its > > management data, as well as a search function, derived from locate_rename_dst() > > from diffcore-rename.c. Thanks to Jonathan Nieder for this design idea. > > Hmmm.... Yet another binary search... Well, not exactly another, it still generalizes code that was already here. > Can we generalize the existing ones first before adding any of this in > (hint: look for "git grep -w -e hi --and -e lo")? With great pleasure. I have simply missed those, only looking for the pattern used in diffcore-rename. Looking at a few ones, that seems just a matter of: * refreshing my "[RFC] Add a sorted-list API for use-cases that require to get the element index." from v2 series * adding support for more than one func, which I already required for bulk-rename