git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] Rename suffixcmp() to has_suffix() and inverse its result

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 5, 2013, 19:12 UTC
Message-ID
<xmqqd2meaci7.fsf@gitster.dls.corp.google.com>
In-Reply-To
<C9A6A1E9-E08C-4C9B-B18D-CED751ACB975@quendi.de>
Max Horn <max@quendi.de> writes:
Show 20 quoted lines
> +1 for the change. I find the resulting code easier to understand, too.
> ...
>
> Taking one step back, shouldn't the commit message rather explain
> the new status, instead of referring so much to the past? If I
> imagine somebody reading this in a year, they might not even know
> suffixcmp (e.g. if they joined the project after this patch was
> merged).
>
> How about something like this:
>
> --- 8< ----
>
> Rename suffixcmp() to has_suffix() and invert its result
>
> 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().
Yes, much more concise and to the point.
Previous: Max Horn
Message 3 of 3 in “Rename suffixcmp() to has_suffix() and inverse its result”
  1. Rename suffixcmp() to has_suffix() and inverse its resultChristian Couder, Nov 5, 2013
  2. Max HornNov 5, 2013
  3. Junio C HamanoNov 5, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.