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

git-p4 and initial import

From
LCLaurent Charrière <lcharriere@promptu.com>
Date
Jul 10, 2014, 13:45 UTC
Message-ID
<53BE98EC.9000200@promptu.com>

I've used git-p4 for several years now and it's generally working well for me.

The only thing that bugs me at this time is having to re-clone regularly. Here is how this happens:

* Say my p4 client maps //foo/bar/... to /home/jdoe/perforce/foo/bar/... 
(I don't want to clone the entire repo, because it's too big).
* I do git p4 clone --use-client-spec //foo /home/jdoe/git/foo, work 
with it, all goes well.
* Meanwhile, at some point somebody else adds //foo/baz.
* Eventually I need //foo/baz. I add it to my p4 client.
* Naturally, git-p4 won't pick up the changes, because they happened 
before I added //foo/baz to my client.
* So I git reset --hard to the first commit, delete even that using git 
update-ref -d HEAD, then again I do git p4 clone //foo 
/home/jdoe/git/foo. When the repo gets big, this takes a lot of time.
So, I have a few questions:
1. Am I doing this wrong? Is there another way I could proceed?
2. It occurred to me that when I re-clone a repository using 
--use-client-spec, I already have everything I need in my local copy of 
the p4 client. Why does git-p4 need to redownload everything from the 
repository? Could we find a way to tell it to p4 sync, then fetch the 
files from the local copy? Or is there a way I can copy everything over 
from my local client and pretend this is the initial import?
Next: Pete Wyckoff
Message 1 of 2 in “git-p4 and initial import”
  1. Laurent CharrièreJul 10, 2014
  2. Pete WyckoffJul 12, 2014

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.