On Wed, Sep 20, 2017 at 9:59 PM, Jeff King wrote:
>> But this compare function is not to order by the natural encoding order,
>> but it's used to detect the '0' at the end of prefix, which orders
>> before *any* unsigned char.
>
> It's not just detecting the "0". We care about the
On 09/20/2017 10:25 PM, Stefan Beller wrote:
> On Mon, Sep 18, 2017 at 11:22 PM, Michael Haggerty
> wrote:
>> [...]
>> +/* Return -1, 0, 1 if refname is before, inside, or after the prefix. */
>> +static int compare_prefix(const char *refname, const char *prefix)
>> +{
>> +
On Wed, Sep 20, 2017 at 01:25:43PM -0700, Stefan Beller wrote:
> > +/* Return -1, 0, 1 if refname is before, inside, or after the prefix. */
> > +static int compare_prefix(const char *refname, const char *prefix)
> > +{
> > + while (*prefix) {
> > + if (*refname != *prefix)
>
On Mon, Sep 18, 2017 at 11:22 PM, Michael Haggerty wrote:
> From: Jeff King
>
> If the underlying iterator is ordered, then `prefix_ref_iterator` can
> stop as soon as it sees a refname that comes after the prefix. This
> will rarely make a big difference
4 matches
Mail list logo