Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-19 Thread Junio C Hamano
Christian Couder christian.cou...@gmail.com writes: There is also a new version of my 86 patch long series to replace prefixcmp() with starts_with() that I am ready to send, but I hesitate to spam the whole list :-) I can put it somewhere like GitHub where people can see everything and

Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-18 Thread Christian Couder
On Sun, Nov 17, 2013 at 9:52 AM, Christian Couder chrisc...@tuxfamily.org wrote: From: Jeff King p...@peff.net On Wed, Nov 13, 2013 at 07:47:03AM +0100, Christian Couder wrote: My preference is: 1) with an s 2) start 3) underscore so that gives: starts_with() and ends_with() FWIW,

Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-17 Thread Christian Couder
From: Jeff King p...@peff.net On Wed, Nov 13, 2013 at 07:47:03AM +0100, Christian Couder wrote: My preference is: 1) with an s 2) start 3) underscore so that gives: starts_with() and ends_with() FWIW, that looks good to me, too. Whether there is confusion over the meaning of

Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-12 Thread Jeff King
On Mon, Nov 11, 2013 at 05:09:17PM +0100, Andreas Ericsson wrote: On 2013-11-09 08:05, Christian Couder wrote: Here is a big patch series to replace prefixcmp() with a new has_prefix() function. Seems like totally useless codechurn to me. Besides, prefixcmp() ties in nicely with strcmp()

Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-12 Thread Junio C Hamano
Jeff King p...@peff.net writes: I am ambivalent on the code churn, but if we do apply it, we should probably leave off the final patch (dropping prefixcmp) for a cycle to let topics in flight catch up to the change. Just diffing master and next, I see some new uses of prefixcmp which will

Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-12 Thread Jeff King
On Tue, Nov 12, 2013 at 08:53:45AM -0800, Junio C Hamano wrote: Even though we already added has_suffix() for tail matches, it is not too late to rethink, as it is not in 'master' yet. One thing I noticed is that it is probably misnamed, or at least in a way that invites confusion. Can

Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-12 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Even though we already added has_suffix() for tail matches, it is not too late to rethink, as it is not in 'master' yet. One thing I noticed is that it is probably misnamed, or at least in a way that invites confusion. Can people tell which one of

Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-12 Thread Junio C Hamano
Christian Couder chrisc...@tuxfamily.org writes: From: Junio C Hamano gits...@pobox.com Even though we already added has_suffix() for tail matches, it is not too late to rethink, as it is not in 'master' yet. One thing I noticed is that it is probably misnamed, or at least in a way that

Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-12 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Christian Couder chrisc...@tuxfamily.org writes: After a look at some languages, Python has startwith() and endswith(), and Java has startWith() and endsWith(). But while we are at it, why not ends_with() and begins_with()? To me using an underscore

Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-12 Thread Jeff King
On Wed, Nov 13, 2013 at 07:47:03AM +0100, Christian Couder wrote: My preference is: 1) with an s 2) start 3) underscore so that gives: starts_with() and ends_with() FWIW, that looks good to me, too. Whether there is confusion over the meaning of suffix or not, it makes sense, all other

Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-11 Thread Andreas Ericsson
On 2013-11-09 08:05, Christian Couder wrote: Here is a big patch series to replace prefixcmp() with a new has_prefix() function. Seems like totally useless codechurn to me. Besides, prefixcmp() ties in nicely with strcmp() and memcmp() (and returns 0 on a match just like its namesakes),

Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-11 Thread Christian Couder
On Sat, Nov 9, 2013 at 3:24 PM, Thomas Rast t...@thomasrast.ch wrote: Christian Couder chrisc...@tuxfamily.org writes: Christian Couder (86): strbuf: add has_prefix() to be used instead of prefixcmp() diff: replace prefixcmd() with has_prefix() fast-import: replace prefixcmd() with

Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-09 Thread Thomas Rast
Christian Couder chrisc...@tuxfamily.org writes: Christian Couder (86): strbuf: add has_prefix() to be used instead of prefixcmp() diff: replace prefixcmd() with has_prefix() fast-import: replace prefixcmd() with has_prefix() [...] builtin/update-ref: replace prefixcmd() with

[PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-08 Thread Christian Couder
Here is a big patch series to replace prefixcmp() with a new has_prefix() function. So the first patch of this series introduces has_prefix() and the last patch removes prefixcmp(). Except in a few cases, I used a script that does basically the following to generate the commits in between: ===