git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Lars Schneider <larsxschneider@gmail.com>
Date
Aug 25, 2015, 10:30 UTC
Message-ID
<23CB37E8-9704-4A9D-8CAB-2812AD59394D@gmail.com>
In-Reply-To
<55DC285D.9030500@web.de>
On 25 Aug 2015, at 10:33, Torsten Bögershausen <tboegi@web.de> wrote:
Show 32 quoted lines
> On 08/25/2015 08:54 AM, Luke Diamand wrote:
>> On 24/08/15 22:30, larsxschneider@gmail.com wrote:
>>> From: Lars Schneider <larsxschneider@gmail.com>
>>> 
>>> Thanks to Luke Diamand I realized the core problem and propose here a
>>> substiantially simpler fix to my PATCH v4.
>>> 
>>> The test cases remain and prove the problem. In particular
>>> "8 - Clone path (ignorecase)" and
>>> "Add a new file and clone path with new file (ignorecase)" fail with the
>>> current implementation on OS X and Linux.
>> 
>> That's a lot simpler, thanks!
>> 
>> Could we give this its own command line option and git config variable?
>> 
>> Core.ignorecase gets set if the client is on a filing system that ignores case. This is slightly different - it squashes case in depot files for people with depots that have incorrectly jumbled-up case.
>> 
>> Conflating the two seems like it would cause confusion at some point - for example, I have no idea how the rest of git behaves if core.ignorecase is set to True on a case-preserving file system.
>> 
> That doesn't work as expected and is not allowed (or say strictly forbidden, or strongly recommended not to do)
> 
> Remembering older discussions about importers from foreign VCS:
> This should work best for most people:
> Look at the command line option, if no one is given,
> look at core.ignorecase.
> 
> So the command line option overrides core.ignorecase,
> and the  user can either run
> --ignore-path-case
> or
> --no-ignore-path-case

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.

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? One thing to keep in mind: This is a one time migration and we don’t develop on these Linux boxes. We usually develop on Windows and Mac. I just use the Linux boxes as migration workers as these scripts usually run a while.

- Lars
Previous: Torsten BögershausenNext: Luke Diamand
Message 6 of 10 in “git-p4: Obey core.ignorecase when using P4 client specs.”
  1. git-p4: Obey core.ignorecase when using P4 client specs.larsxschneider@gmail.com, Aug 24, 2015
  2. git-p4: Obey core.ignorecase when using P4 client specs.larsxschneider@gmail.com, Aug 24, 2015
  3. Luke DiamandAug 25, 2015
  4. Lars SchneiderAug 25, 2015
  5. Torsten BögershausenAug 25, 2015
  6. Lars SchneiderAug 25, 2015
  7. Luke DiamandAug 25, 2015
  8. Lars SchneiderAug 25, 2015
  9. Luke DiamandAug 25, 2015
  10. Luke DiamandAug 26, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.