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

2013-11-20 Thread Christian Couder
From: Junio C Hamano > > Antoine Pelisse writes: > >> I'm not exactly sure I understand the point of not squashing all those >> patches together ? >> It's not like one is going without the others, or that the commit >> message provides some new information (except for the name of the >> file, bu

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

2013-11-19 Thread Junio C Hamano
Antoine Pelisse writes: > On Tue, Nov 19, 2013 at 10:04 PM, Christian Couder > wrote: >> To avoid spamming the list again, I am going to send the following >> patches from the 86 patch long series to replace prefixcmp() with >> starts_with(): >> >> [PATCH v2 00/86] replace prefixcmp() with start

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

2013-11-19 Thread Antoine Pelisse
On Tue, Nov 19, 2013 at 10:04 PM, Christian Couder wrote: > To avoid spamming the list again, I am going to send the following > patches from the 86 patch long series to replace prefixcmp() with > starts_with(): > > [PATCH v2 00/86] replace prefixcmp() with starts_with() > [PATCH v2 01/86] strbuf:

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

2013-11-19 Thread Christian Couder
From: Jonathan Nieder > Christian Couder wrote: > >> And in vcs-svn/fast_export.c there was already an ends_with() >> function that did the same thing. Let's used the renamed one >> while at it. > > Yes, despite the change in signature this shouldn't slow anything > down. Thanks. > > For what

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

2013-11-19 Thread Jonathan Nieder
Christian Couder wrote: > Now ends_with() returns 1 when the suffix is present and 0 otherwise. Sounds good. [...] > And in vcs-svn/fast_export.c there was already an ends_with() > function that did the same thing. Let's used the renamed one > while at it. Yes, despite the change in signature t

[PATCH v4 2/2] Rename suffixcmp() to ends_with() and invert its result

2013-11-17 Thread Christian Couder
Now ends_with() 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(). Some popular programming languages have functions or m