Subject: Re: [PATCH v2] git-p4: fix faulty paths for case insensitive systems

From: Torsten Bögershausen <[email-masked]>
Date: Thu, 20 Aug 2015 21:02:29 +0200

On 2015-08-20 09.16, Lars Schneider wrote:
> Thanks for your feedback! See my answers below.
>> Identify path names that are different with respect to case sensitivity.
> Agreed!
> 
>>
>>
>>> If there are any then run `p4 dirs` to build up a dictionary
>>> containing the "correct" cases for each path. It looks like P4
>>> interprets "correct" here as the existing path of the first file in a
>>> directory. The path dictionary is used later on to fix all paths.
>>>
>>> This is only applied if the parameter "--fix-paths" is passed to the
>>> git-p4 clone command.
>> The "fix-path" doesn't tell a user what exactly is fixed.
>> Something like "fix-path-case" may be more self-explaining,
>> but I would simply use "--ignore-case", which is more in line
>> with Git. (But this is debatable)
> I agree but “—ignore-case” seems a bit broad to me. How about “—ignore-path-case”? Because it is really only about paths case, not filename case.
OK, better.

>>> -    def update_client_spec_path_cache(self, files):
>>> +    def update_client_spec_path_cache(self, files, fixPathCase = None):
If you want, you can change the name of the parameter into ignorePathCase,
but I'm not sure...

> Can you try to rephrase your comment? I don’t get it. My “cd command” is already in parenthesis (== subshell), no?
I may have commented on the wrong TC :-(

This is the one:
+test_expect_success 'Create a repo with path case variations' '
+	client_view "//depot/... //client/..." &&
+	cd "$cli" &&
+
+	mkdir -p One/two &&
+	[snip]
+'

which should be like this:
+test_expect_success 'Create a repo with path case variations' '
+ client_view "//depot/... //client/..." &&
+ (
+	cd "$cli" &&
+	mkdir -p One/two &&
+ 	[snip]
+ )
+'