From: Junio C Hamano Date: Tue, 05 Nov 2013 19:12:48 GMT Subject: Re: [PATCH v2] Rename suffixcmp() to has_suffix() and inverse its result Message-ID: In-Reply-To: Max Horn writes: > +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.