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

git-p4: Import not at root of tree.

From
David Brown <git@davidb.org>
Date
Dec 6, 2007, 05:15 UTC
Message-ID
<20071206051524.GA21207@old.davidb.org>

I'm trying to mirror a directory deep down in a very chaotically organized Perforce repo. I'd like the git tree to contains the contents of this directory, but not at the root of my tree.

In other words I'd like to have something like
   git-p4 clone --strip=//depot/a/b/c --destination=foo //depot/a/b/c/d
Result in:
   foo/d/...

and have only a single directory 'd' at the top of the resulting git repo. My current choices seem to be to put the contents of 'd' at the root, or have the whole 'a/b/c/d' tree visible as what the '--keep-path' option does.

If this isn't implemented, any suggestions on the best way to go about implementing this, or another way to do this.

What I'm trying to do is emulate the behavior of a P4 client spec. There is a single directory (now, there will probably be others later) that is in a different place in Perforce and it needs to be in this directory in order to build. I've tried working with a submodule, but it is cumbersome to do things like bisections when there are dependencies between the trees.

Thanks, Dave

Message 1 of 1 in “git-p4: Import not at root of tree.”
  1. David BrownDec 6, 2007

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.