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

Re: Git-P4 Bug With Filename Case Change

From
PWPete Wyckoff <pw@padd.com>
Date
Jul 20, 2013, 13:34 UTC
Message-ID
<20130720133418.GA18479@padd.com>
In-Reply-To
<897B3B32-0200-4290-AA16-DCAF42923CE0@imgtec.com>
Aaron.Dwyer@imgtec.com wrote on Wed, 17 Jul 2013 22:11 +0000:
> 	We recently have moved our project from Git to Perforce and those of us who prefer Git still are using Git p4 to stay in Git land.  One of the files in our repository was renamed while still in Git, but the rename only consisted of a case change of a character in the name.  Now, on an OS X box with a case insensitive file system (not sure if that matters), one of our guys cloned from perforce with Git p4 and used @all to get all history.  When this operation is finished, the file name is in its original state, not the newer renamed state.
So original file "Foo", new file "foo", to make it concrete.

The "git p4 clone" command generates an internal .git/ history of the entire p4 repository, before checking out any files in the workspace. It does this without touching the filesystem, so I would expect it never to mangle case, even on OSX.

You should be able to verify this with:
    mkdir test1
    cd test1
    git init
    git p4 clone --bare --destination . //depot/proj@all
    git ls-tree HEAD
and see that "foo" is there, not "Foo".
Then check that the rename really did happen:
    git log --stat --summary --follow -- foo
should show a "rename Foo => foo" in there somewhere.

Does this all work? I'd like to clear up this confusing part first.

> 	Perforce doesn't respect that file as being in the repository.  We noticed this after making a local Git commit and upon issuing a Git p4 submit, things go haywire with "file(s) not opened on this client" and nothing getting submitted.
Yep, it's all bad from there-on, I'm sure.

I'm a bit out of my depth on case-insensitive file systems. Do check if the cloner in question has core.ignorecase config option set:

    git config --get core.ignorecase
		-- Pete
Previous: Aaron Dwyer
Message 2 of 2 in “Git-P4 Bug With Filename Case Change”
  1. Aaron DwyerJul 17, 2013
  2. Pete WyckoffJul 20, 2013

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.