git p4 clone has no files

I'm migrating from Perforce to git, and in the process I'm trying to get the file structure right.

The current perforce structure is something like this:


and I'm shooting for something like this in git:


I set up my client spec View as follows (I'll worry about the branches later):

//depot/android/main/... //p4-git/android/...
//depot/android/core_library/main/... //p4-git/core_library/...

Wen I run the following, the full commit history appears, but no files.

set P4CLIENT=p4-git
git p4 clone --use-client-spec //p4-git/@all


The problem is in this line:

git p4 clone --use-client-spec //p4-git/@all

Here you're passing a client path (//p4-git), but git-p4 expects a depot path. This causes problems later on when it tries to map Perforce depot paths to Git paths. Try running

git p4 clone --use-client-spec //depot/android/main/@all


Bear in mind that if you specify --use-client-spec, git-p4 will automatically use your client spec, whichever one that is. It will also remember this choice and use it for future git-p4 commands. It's probably a good idea to:

  • create a dedicated client for git-p4 work
  • make sure P4CLIENT is set to this client whenever you use git-p4
  • avoid changing the view of your git-p4 client

Need Your Help

How can I programmatically detect if some text is visible or has overflowed in an InDesign document using ExtendScript?

adobe-indesign extendscript

I am building an InDesign panel with ExtendScript which finds text and shows it to the user. To do this, I use the showText() method of the Character object. The problem is that sometimes the text ...

In Java what is the relationship between a nested class and its outer class?

java reference nested inner-classes nested-class

When a nested class in instantiated how does it reference the outer class? Does it always extend the outer class or reference it another way? I was told that the inner extends the outer but then why