git-p4: Import not at root of tree.

From: David Brown <hidden>
Date: 2016-06-15 22:43:56

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help