Subject: Re: [PATCH] apply: support case-only renames in case-insensitive filesystems

From: Junio C Hamano <[email-masked]>
Date: Sun, 12 Jun 2022 16:35:53 -0700

Junio C Hamano <[email-masked]> writes:

> ...  I
> do not think in_fn_table() pays attention to "ignore_case" option,
> so there may be an existing bug there already, regardless of the
> problem you are trying to address with your patch.
>
> And I wonder if doing case-insensitive match in in_fn_table() lets
> us cover this new case as well as "fixing" the existing issue.

While I still think in_fn_table() should be looked into for an
existing case sensitivity bug, I think this one is different enough
that in_fn_table() logic wouild not trigger for it, and a patch to
add an extra piece of logic for renames is probably needed.

It might be sufficient to tighten the condition so that it triggers
only to the case you wanted to handle, i.e. a rename between the
same name.

	else if (ignore_case && old_name && new_name &&
		 !strcasecmp(old_name, new_name))

(the "both names must be non-NULL" check is new).

Thanks.