Re: [PATCH v6] git-p4: Obey core.ignorecase when using P4 client specs.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26 Aug 2015, at 22:05, Junio C Hamano <gitster@xxxxxxxxx> wrote:

> larsxschneider@xxxxxxxxx writes:
> 
>> From: Lars Schneider <larsxschneider@xxxxxxxxx>
>> 
>> We run P4 servers on Linux and P4 clients on Windows. For an unknown
>> reason the file path for a number of files in P4 does not match the
>> directory path with respect to case sensitivity.
> 
> Thanks, but is this still "For an unknown reason", or during the
> course of debugging you found the root cause, which is what led to
> this fix?
We are migrating away from P4 and therefore I haven’t debugged the root cause. The source of this problem is 100% P4 related. No Git involvement at all. Maybe I just remove this paragraph?


> 
>> 
>> E.g. "p4 files" might return
>> //depot/path/to/file1
>> //depot/pATH/to/file2
>> 
>> If you use P4/P4V then these files end up in the same directory, e.g.
>> //depot/path/to/file1
>> //depot/path/to/file2
>> 
>> If you use git-p4 and clone the code via client spec "//depot/path/..."
>> then all files not matching the case in the client spec will be ignored
>> (in the example above "file2"). This is correct if core.ignorecase=false
>> but not otherwise.
> 
> This sentence is hard to grok.  What are you describing?  Solution?
> Current problematic behaviour?  Desired behaviour that the patch
> attempts to obtain?
I tried to describe the situation that causes the strange behavior.

> 
> If I paraphrase it like this, did I understood you correctly?
> 
>    The current code always ignores paths in wrong case that do not
>    match client spec.  It is correct to ignore them when
>    core.ignorecase is not set; //depot/path/ and //depot/pATH/ are
>    different things in that case.
> 
>    But it is a wrong thing to do if core.ignorecase is set to true.
>    Let's make sure we avoid it by downcasing the depot_path when
>    core.ignorecase is set to true.

How about this:

-----------------
The current code always ignores files with paths that do not match the case of the paths defined in the client spec. This commit changes this behavior and obeys these files if “core.ignorecase” is set to "true”.

Example:
A P4 repository contains the following files:
//depot/path/to/file1
//depot/pATH/to/file2

The P4 repository is cloned with git-p4 and the following client spec view:
//depot/path/… //client/...

The cloned Git repository will contain only the following file:
to/file1

“file2” is not present in the cloned Git repository. If “core.ignorecase" is set to “true” then path case sensitivity is ignored and “file2” will be present.
————————

Thanks,
Lars

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]