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, 13:14 UTC
Message-ID
<B7632D9A-BB8B-41E5-9C3D-F7376A0C81D3@gmail.com>
In-Reply-To
<CAE5ih7-o6eVF-z2GORxHa_TdDaXgexLpW3jctESTnL46Mfdo8w@mail.gmail.com>
On 25 Aug 2015, at 13:57, Luke Diamand <luke@diamand.org> wrote:
Show 27 quoted lines
> On 25/08/15 11:30, larsxschneider@gmail.com 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.
Show 8 quoted lines
> 
> 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
Previous: Luke DiamandNext: Luke Diamand
Message 8 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.