Jeff King <> 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 need adjusted, along
> with spots where the patches themselves will cause textual conflicts.

Yes, I did that check too (but between 'maint' and 'pu'). I think it
is a good idea to stop using whatever_cmp() name for things that are
not *cmp() functions in the longer term, but smooth migration is a
bit tricky (but not as tricky as end-user visible transitions).

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 these is
correct without looking at existing callsites?

        has_suffix(filename, "txt");
        has_suffix(filename, ".txt");

The semantics of the function we have is the latter and is better
called endswith(), I suspect.  And the corresponding function to
check for head matches should probably be called beginswith().
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to