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

Re: git fast-import : How to change parent during import?

From
Vitor Antunes <vitor.hda@gmail.com>
Date
Mar 9, 2011, 14:21 UTC
Message-ID
<AANLkTin-Zpk1mZ4hWy1HVL68a0qFjv=8Gne3FBNH8nio@mail.gmail.com>
In-Reply-To
<20110308222328.GE26471@elie>
Hi Jonathan,
On Tue, Mar 8, 2011 at 10:23 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 27 quoted lines
> It's likely I misunderstood what you're trying to do.  If you have
> some work in progress, I'd be glad to look at it.
>
> Anyway, concerning tag fixup branches: git://repo.or.cz/cvs2svn.git
> has an example in cvs2svn_lib/git_output_option.py::process_tag_commit.
> The idea is to make commits that don't belong to any branch on a
> separate TAG_FIXUP ref, using the "reset" command where appropriate;
> then the resulting commits can be inspected, merged, reset to, or used
> in some other way later.
>
> The "tag fixup" idea is that in VCSes like CVS, tags do not
> necessarily match the content on any branch.  So the history looks
> somewhat like so (time flowing left to right):
>
>                     TAG
>                    /
>  o --- o --- o --- o --- o --- o ...
>
> instead of the perhaps more sensible
>
>  o --- o --- o --- TAG --- o --- o ...
>
> The side branch leading up to a tag does not correspond to any branch
> name; after it is in the correct state one can use the "tag" command
> to get it remembered in permanent history.  The same technique might
> be useful whenever you are creating history that is not meant to stay
> permanently on any branch.

I think I understood the idea behind TAG_FIXUP and I think it can be a better solution for my problem. I could make the commit into TAG_FIXUP, search for a better parent in the source branch and then reset it to that parent or rebase it over any other commit. I'll try to do this in the following days, so I will most likely come back with more doubts :)

Thanks,
-- 
Vitor Antunes
Previous: Jonathan NiederNext: Vitor Antunes
Message 5 of 9 in “git fast-import : How to change parent during import?”
  1. Vitor AntunesMar 8, 2011
  2. Jonathan NiederMar 8, 2011
  3. Vitor AntunesMar 8, 2011
  4. Jonathan NiederMar 8, 2011
  5. Vitor AntunesMar 9, 2011
  6. Vitor AntunesMar 30, 2011
  7. Vitor AntunesAug 28, 2011
  8. Jonathan NiederAug 28, 2011
  9. Sverre RabbelierAug 29, 2011

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.