Subject: Re: [PATCH v3 00/14] Clean up how fetch_pack() handles the heads list

From: Michael Haggerty <[email-masked]>
Date: Mon, 10 Sep 2012 23:59:59 +0200

On 09/09/2012 08:15 PM, Junio C Hamano wrote:
> Jeff King <[email-masked]> writes:
> 
>> On Sun, Sep 09, 2012 at 03:20:18AM -0700, Junio C Hamano wrote:
>>
>>> Michael Haggerty <[email-masked]> writes:
>>>
>>>> This patch series depends on the "Add some string_list-related
>>>> functions" series that I just submitted.
>>>
>>> Makes sense.  The only worry (without reading the series first) I
>>> have is that the use of string list may make the responsiblity of
>>> sorting the list fuzzier. I am guessing that we never sorted the
>>> refs we asked to fetch (so that FETCH_HEAD comes out in an expected
>>> order), so use of unsorted string list would be perfectly fine.
>>
>> I haven't read the series yet, but both the list of heads from the user
>> and the list of heads from the remote should have been sorted by 4435968
>> and 9e8e704f, respectively.
> 
> OK.  As long as the sort order matches the order string-list
> internally uses for its bisection search, it won't be a problem,
> then.

The sorting is crucial but there is no bisection involved.  The sorted
linked-list of references available from the remote and the sorted
string_list of requested references are iterated through in parallel.

Michael

-- 
Michael Haggerty
[email-masked]
http://softwareswirl.blogspot.com/