Re: Stripping 'git-svn-id' from commit messages, and switching to svn.noMetadata
- From
Sam Vilain <sam@vilain.net>
- Date
- Jan 24, 2008, 00:07 UTC
- Message-ID
- <4797D6C6.207@vilain.net>
- In-Reply-To
- <877ii0p89b.fsf@adler.orangeandbronze.com>
JM Ibanez wrote:
Show 24 quoted lines
> Hi, > > I've been trying to convert an existing git-svn clone to noMetadata > (i.e. get rid of git-svn-id in the commit messages), primarily because > I've been using it to track two SVN repos which were originally just a > single repo-- they have the same UUID but are located on different > machines, and have branched significantly, so content-wise are no longer > the same repo. > > Because the two repos have a single line of commits which they share, it > would be best if I could store that history in my git repo (as I need to > use it for merging between the two trees). Graphically, my current > history looks something like this: > > > A -- B -- C -- D -- E -- a -- b -- c > > A'-- B'-- C'-- D'-- E'-- x -- y -- z > > where, in reality, this should be represented as: > > A -- B -- C -- D -- E -- a -- b -- c > \ > +- x -- y -- z
Stop.
Use a graft. in .git/info/grafts, put (expanding to the full SHA1s):
x E
Then just run something like 'git filter-branch E..z'
That will at least stitch them together.
To figure out what git-svn is expecting, make a new repository, use git-svn init, and then git-svn fetch -rNNN (where NNN is a revision near the most recent). That will at least show you what git-svn expects the metadata to look like, if you really want to go down the path you are going down...
Sam.