On Thu, Nov 7, 2013 at 1:12 AM, Junio C Hamano gits...@pobox.com wrote:
Jonathan Nieder jrnie...@gmail.com 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().
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
On 06.11.2013, at 23:17, Jonathan Nieder jrnie...@gmail.com 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
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 to care
Am 07.11.2013 um 00:28 schrieb Jonathan Nieder jrnie...@gmail.com:
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 can
Jonathan Nieder jrnie...@gmail.com 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,
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
7 matches
Mail list logo