as pointed out by Thomas, my original description of our problem and question was too verbose
and cluttered, so here is another attempt that is shorter and more to the point:
We have a Subversion repository with this layout:
Essentially, this is Subversion standard layout, plus a "vendor branch".
In greater detail, unfolding the trunk/ and vendor/ directories, the structure
.../ # All the project directories.
ExtLibs/ # External libraries.
In Subversion, we used to use the vendor branch strategy to update the external libraries: If a
new version of zlib was released, we dropped its .tar.gz into vendor/zlib/ (adding/deleting
files as necessary), then merged vendor/zlib/ to trunk/ExtLibs/zlib/.
(As a detail, observe how vendor/ maps to ExtLibs/, not to trunk/. That is, after a new zlib/
was committed to vendor/zlib/, we could also have merged the whole vendor/ to trunk/ExtLibs/,
but - obviously and unfortunately - not vendor/ to trunk/, because vendor/ is missing the
intermediate ExtLibs/ directory.)
We can convert the above repository to Git like this:
> git svn init svn://thubi-cfs/Project/cafu -s Project
> cd Project
> git config --add svn-remote.svn.fetch "vendor:refs/remotes/vendor"
> git svn fetch
The second to last line causes it to import vendor/ just like any other branch.
This works, BUT:
a) vendor/ gets imported as an independent series of commits with a separate root. At no point
is it branched from or merged back to the main series of commits, as would be expected after
e.g. a zlib/ update.
b) Worse, vendor/ obviously cannot be merged, because its relative position is wrong: it matches
trunk/ExtLibs/, not trunk/.
c) If the repository structure was like
ExtLibs/ # extra layer to make vendor/ match trunk/
then "b)" would not be an issue, but from our experience with similar cases, git-svn would
*still* not see the proper branch and merge points. (This was also the case with our website.)
In this case, we could however use grafting and filter-branch to fix the issue.
I'm sorry that this still a long description, but I don't know how to make it shorter while
preserving the necessary details (and the attempt at clarity).
The question is, how can we best import the main project below cafu/, so that it also has the
proper branches from and merges to vendor/ ?
Many thanks and best regards,
Cafu - the open-source Game and Graphics Engine
for multiplayer, cross-platform, real-time 3D Action
Learn more at http://www.cafu.de
You received this message because you are subscribed to the Google Groups "Git for
human beings" group.
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to
For more options, visit this group at