Re: git fast-import : How to change parent during import?
- From
Vitor Antunes <vitor.hda@gmail.com>
- Date
- Mar 8, 2011, 21:19 UTC
- Message-ID
- <AANLkTini6NgeYxRdFtSDKe8GEEszDvXwRtLnuymiRNt4@mail.gmail.com>
- In-Reply-To
- <20110308024427.GA21471@elie>
Hi Jonathan,
On Tue, Mar 8, 2011 at 2:44 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 6 quoted lines
>> Is it possible to change the parent of a commit during fast import? >> I've tried using "reset" command and making a new commit pointing to a >> new parent, but in both cases I get a "new tip ... does not contain >> ..." error message. > > Have you tried "git fast-import --force"?
Oh... I completely overlooked the command line argument list in the man page... Thanks for the tip, worked like a charm!
Show 11 quoted lines
>> Providing a bit of context. I'm trying to improve git-p4 to detect the >> parent commit of a new branch. > [...] >> To achieve this I used the checkpoint command to flush the list of >> imported commits to disk and then used standard rev-list and diff-tree >> commands to make find the parent commit. I am now at a point where I >> am able to correctly identify the parent commit, but when trying to >> update the from information I get the above message. > > The advice in the section "Use Tag Fixup Branches" of git-fast-import(1) > might be useful.
I'm still trying to understand it. Do you know of any practical example that I can look into?
Thanks for your help,
-- Vitor Antunes