git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tor Arvid Lund <torarvid@gmail.com>
To: Kent Borg <kentborg@borg.org>
Cc: git@vger.kernel.org
Subject: Re: git-p4
Date: Mon, 13 Sep 2010 23:58:08 +0200	[thread overview]
Message-ID: <AANLkTingvEFDygkKipBXfCHJr2=oMQrYv3FKpxpo+TkW@mail.gmail.com> (raw)
In-Reply-To: <4C8E511F.8000400@borg.org>

On Mon, Sep 13, 2010 at 6:28 PM, Kent Borg <kentborg@borg.org> 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-

  reply	other threads:[~2010-09-13 21:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4C8A8CE8.90600@borg.org>
2010-09-10 21:53 ` git-p4 Alejandro Riveira Fernández
2010-09-11 18:42   ` git-p4 Tor Arvid Lund
2010-09-12 15:30     ` git-p4 Kent Borg
2010-09-12 17:22       ` git-p4 Tor Arvid Lund
2010-09-12 17:59         ` git-p4 Kent Borg
2010-09-12 19:54           ` git-p4 Tor Arvid Lund
2010-09-12 20:07             ` git-p4 Kent Borg
2010-09-12 20:12               ` git-p4 Tor Arvid Lund
2010-09-13 14:23                 ` git-p4 Kent Borg
2010-09-13 15:01                   ` git-p4 Tor Arvid Lund
2010-09-13 16:28                     ` git-p4 Kent Borg
2010-09-13 21:58                       ` Tor Arvid Lund [this message]
2010-09-16 12:14                         ` git-p4 Kent Borg
2010-09-16 13:54                           ` git-p4 Tor Arvid Lund
2008-09-07 13:17 git-p4 dhruva
  -- strict thread matches above, loose matches on Subject: below --
2008-09-07 13:17 git-p4 dhruva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTingvEFDygkKipBXfCHJr2=oMQrYv3FKpxpo+TkW@mail.gmail.com' \
    --to=torarvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kentborg@borg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).