On Thu, Nov 7, 2013 at 1:12 AM, Junio C Hamano wrote:
> Jonathan Nieder 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 tha
Jonathan Nieder 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
> Am 07.11.2013 um 00:28 schrieb Jonathan Nieder :
>
> Max Horn wrote:
>
>> Well, unlike suffixcmp, it is transitive, so it could be used for sorting.
>
> It is not antisymmetric.
>
>prefixcmp("foo", "foobar") < 0
>prefixcmp("foobar", "foo") == 0
Right! I wasn't thinkinh :-(
>
> I c
Max Horn wrote:
> Well, unlike suffixcmp, it is transitive, so it could be used for sorting.
It is not antisymmetric.
prefixcmp("foo", "foobar") < 0
prefixcmp("foobar", "foo") == 0
I can see how it's possible to care about the sign of the return
value, but it's equally possible
On 06.11.2013, at 23:17, Jonathan Nieder wrote:
> Hi,
>
> Christian Couder wrote:
>
>> Now has_suffix() returns 1 when the suffix is present and 0 otherwise.
>
> Ok. My only worry is that the function is less discoverable since
> its name is so different from prefixcmp(), which might cause s
Hi,
Christian Couder wrote:
> Now has_suffix() returns 1 when the suffix is present and 0 otherwise.
Ok. My only worry is that the function is less discoverable since
its name is so different from prefixcmp(), which might cause someone
to invent yet another postfixcmp.
> The old name followed
Now has_suffix() returns 1 when the suffix is present and 0 otherwise.
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().
Signed-off-by: Christian Couder
---
builtin/clone.c
7 matches
Mail list logo