Re: [PATCH v3 2/2] Rename suffixcmp() to has_suffix() and invert its result

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 7, 2013 at 1:12 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Jonathan Nieder <jrnieder@xxxxxxxxx> writes:
>
>>> The old name followed the pattern anything-cmp(), which suggests
>>> a general comparison function suitable for e.g. sorting objects.
>>> But this was not the case for suffixcmp().
>>
>> It's not clear to me that prefixcmp() is usable for sorting objects,
>> either.  Shouldn't it get the same treatment?
>
> Sounds like a plan for a good follow-up series.

Ok, I will have a look.

>> If some day we invent a type for 4-byte-aligned object names, it might
>> make sense to do something similar to hashcmp, distinguishing between
>> hashcmp for use where ordering is important and something like hash_eq
>> when checking for equality (since I suspect the latter can be made
>> faster).
>
> Interesting.

Yeah, but I will pass on this one.

Thanks,
Christian.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]