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

Re: Importing merges when converting repos from SVN to Git (fusing grafts in the Git history)

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jan 8, 2008, 15:13 UTC
Message-ID
<47839311.2010606@viscovery.net>
In-Reply-To
<744EF0AD-4773-4A35-B772-94621E9ADA10@lrde.epita.fr>
Benoit Sigoure schrieb:
Show 12 quoted lines
> I'm going to import the repositories with `git-svn' and then I'd like to
> rewrite the entire history to take these merges in account in the Git
> repo, if possible.  This will probably help us merging the (former) SVN
> branches in our new Git repo.  I know I can simulate a merge with a
> graft and I think it will be fairly easy to write a small script that
> parses the log and generates the corresponding graft file.  Now the
> question is: how to make these grafts part of the *real* history so that
> we don't have to depend on the graft file anymore?
> 
> I know this issue has already been raised on the ML (the "how to include
> grafts are real merges in the history" thing) but I couldn't find the
> corresponding posts and can't remember the conclusion...
	git-filter-branch --tag-name-filter=cat --all

should do it. It rewrites nothing but the parenthood, so you will find that the rewritten history shares everything with the original history up to the first merge(s).

You better run this on a "cp -al" copy of the original converted repository because it *overwrites* the tags.

-- Hannes
Previous: Benoit SigoureNext: Benoit Sigoure
Message 2 of 3 in “Importing merges when converting repos from SVN to Git (fusing grafts in the Git history)”
  1. Benoit SigoureJan 8, 2008
  2. Johannes SixtJan 8, 2008
  3. Benoit SigoureJan 21, 2008

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.