Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-16

Re: [PATCH v2 04/12] worktree.c: mark current worktree

From: Junio C Hamano <hidden>
Date: 2016-06-16 02:18:53

Jeff King [off-list ref] writes:
On Thu, Apr 21, 2016 at 10:23:09AM -0400, Eric Sunshine wrote:
quoted
quoted
While we're at it, how about renaming it to pathcmp (and its friend
strncmp_icase to pathncmp)?
Yes, that seems like a good idea. For anyone familiar with
strcasecmp() or stricmp(), having "icase" in the name makes it seem as
though it's unconditionally case-insensitive, so dropping it from the
name would likely be beneficial.
Seconded (thirded?). I have been caught by this confusion in the past,
too.
I agree that strcmp_icase() gives a false impression that it always
ignores case differences, but a new name that does not at all hint
that it may do icase comparison as necessary will catch me by an
opposite confusion in the future.

I have not yet formed a firm opinion if pathcmp() conveys enough
hint.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help