Re: git-p4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 13, 2010 at 6:28 PM, Kent Borg <kentborg@xxxxxxxx> wrote:
> Tor Arvid Lund wrote:
>> git remote, shows remotes as defined in your .git/config file (the
>> [remote "someremotename"] sections). git-p4 does not need nor create
>> such entries.
>
> I am confused trying to understand what kind of beast the p4/master is.
>
> I think my fundamental problem is that I need p4/master to point at a
> branch with a real git history, not a sync from Perforce (which has no
> git history).

Well, then I think you are a bit confused ;)

The p4/master branch is git's view of your p4 history. So p4/master
points to the most recent git/perforce commit. An important side point
here, is that if you have another remote (which you do in your case)
that is a pure git remote that knows nothing about p4, then the
p4/master branch and the origin/master branch will be disjoint.

> How do I change where p4/master points?  (Put another way, how can I
> have a complete Linux history in git but only new work in Perforce?)

Ehm, thinking about this some more, I wonder if this whole endeavor
might be continually painful...

Say that you clone Linus' kernel tree with git, and that commit X is
the master where you will start your work.

You then import your tree at commit X into p4, and sync it back using
git-p4. That git-p4 sync will give you a commit X' - Such that
checking out X or X' will yield the same checkout tree, but they will
have differing commit IDs... Do you have a strategy if you:

1) Commit something, Y', on top of X' in git (and syncs with p4).
2) Someone else commits Z on top of X, which you get when you do git fetch.

What do you do in p4? You can't be sure that it'll work to apply Z on
top of Y', nor the other way around...

It kind of seems like you want to have two different repositories, and
you want these to be equal (no one is the "one true repository"), and
this presents problems in the scenario I described above, right?

I think maybe draw a few branch trees for git and p4/git-p4 and your
own work on a good old piece of paper... It often helps to clear the
head and think freshly (is that a word?).

-Tor Arvid-
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]