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

Re: git-p4

From
Tor Arvid Lund <torarvid@gmail.com>
Date
Sep 13, 2010, 15:01 UTC
Message-ID
<AANLkTimL3mB8LeUOANsJO7p9uwqDCN9wKnLVMTq_-=3H@mail.gmail.com>
In-Reply-To
<4C8E33DF.7010904@borg.org>
On Mon, Sep 13, 2010 at 4:23 PM, Kent Borg <kentborg@borg.org> wrote:
Show 17 quoted lines
> Tor Arvid Lund wrote:
>>> I don't have time to try the "git p4 submit" now, I am going to be late
>>> in meeting my wife.  Tomorrow morning...will it work?
>>>
>>
>> I'm optimistic :)
>
> Um, not so great.
>
> Two problems:
>
>  - I was on the wrong branch this morning when I did the
>   "git p4 submit" (stupid me),
>
>  - I realize that even if I had done that right, part of my
>   history is a big lump of Linux kernel files with no history
>   but a sync out of Perforce.

I don't know if I understand what you mean here... If "git diff p4/master.." gives output equivalent to what you would want to submit to p4, then that seems correct to me.

Show 14 quoted lines
> So it seems what I need to do is get on a clean branch that has good
> history and cherry-pick all the bits I want off the branch with the bad
> ancestry onto the clean branch.  (And get a good "[git-p4: depot-paths:
> ..." in place.)
>
> Then...just point p4/HEAD and p4/master and master to the newest commit
> on that new clean branch.  Voila!
>
> Possibly one of my last stupid questions on this: How do I do that?
> "p4/master" looks like a remote, but "git remote" doesn't seem to know
> about it.  In gitg "master" is green, just like a branch I might create,
> so I figure I can delete and re-create it where I want, but "p4/master"
> and "p4/HEAD" is blue.  What are these blue things?  How do I move them
> to a different commit?

Well, I don't know gitg, but I can guess that it shows branches as blue if they are files created inside refs/remotes/*. This is the case for p4/master and p4/HEAD. They are placed there because normally, users should not update these refs, nor should they directly do checkouts of these branches (but your case is not exactly that normal).

git remote, shows remotes as defined in your .git/config file (the [remote "someremotename"] sections). git-p4 does not need nor create such entries.

-Tor Arvid-
Previous: Kent BorgNext: Kent Borg
Message 10 of 14 in “Re: git-p4”
  1. Alejandro Riveira FernándezSep 10, 2010
  2. Tor Arvid LundSep 11, 2010
  3. Kent BorgSep 12, 2010
  4. Tor Arvid LundSep 12, 2010
  5. Kent BorgSep 12, 2010
  6. Tor Arvid LundSep 12, 2010
  7. Kent BorgSep 12, 2010
  8. Tor Arvid LundSep 12, 2010
  9. Kent BorgSep 13, 2010
  10. Tor Arvid LundSep 13, 2010
  11. Kent BorgSep 13, 2010
  12. Tor Arvid LundSep 13, 2010
  13. Kent BorgSep 16, 2010
  14. Tor Arvid LundSep 16, 2010

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.