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

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

 



On 25 Aug 2015, at 13:57, Luke Diamand <luke@xxxxxxxxxxx> wrote:

> On 25/08/15 11:30, larsxschneider@xxxxxxxxx wrote:
> 
>> Unfortunately the command line option is not sufficient as the resulting paths are still messed up. I added the switch but it looks like as core.ignorecase does some additional magic on fast-import. You can see my changes here:
>> https://github.com/larsxschneider/git/commit/b4399179ff542161c2c5b83c34c5b4901287ceb0
>> 
>> You can also run the unit tests to see the results here:
>> https://github.com/larsxschneider/git/tree/lars/fix-path-v5-with-command-switch
>> 
>> The only way I could image to fix that is to request every path from P4 as shown in my PATCH v4. This would be slow and the change would be rather huge.
> 
> Yes, you're right - fast-import has special handling based on core.ignorecase.
> 
> There was a thread a while back saying that it shouldn't do this, and
> instead should have a new --casefold option, which would make more
> sense, but isn't the case at present.
> 
> http://www.spinics.net/lists/git/msg243264.html
> 
>> I am curious:
>> I run all my P4 -> git migrations on a Linux box with EXT4 and core.ignorecase=True. I did not realize that this might cause trouble. What could happen and what should I look out for?
> 
> An obvious way it could go wrong would be if you had a a repo that
> _did_ care about case (e.g. had Makefile and makefile in the same
> directory) and you then tried to git-p4 clone a separate repo into a
> different branch. In an ideal world, you would only use the
> case-folding on the git-p4 based repo. I think while fast-import just
> checks core.ignorecase, that's not possible.
OK. Thanks for the explanation.

> 
> So the choices are:
> 
> 1. A new command-line option which would silently set core.ignorecase
> 2. Users just have to know to set core.ignorecase manually before
> using git-p4 (i.e. Lars' patch v5)
> 3. Fix fast-import to take a --casefold option (but that's a much bigger change)
> 
I vote for 2 because that solves the problem consistently with the existing implementation for now. That means we don’t surprise git-p4 users. In addition I would try to fix (3), the —casefold option, in a separate patch. Although this (3) patch could take a bit as I have two more git-p4 patches in the queue that I want to propose to the mailing list first.

- 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]