Given a pre-existing SVN structure like this:
trunk/
tools/
frob-1.2/
frob-1.4/
frob-1.8/
frob-latest/ => frob-1.8/
Where "frob-latest" is created by an svn:external
property as a within-same-repository link...
What is the best way to replicate this in a Git-SVN mirror of the above repository, and in a pure Git repository (as we are considering migrating to Git in the future)? I'm looking for something that works in both Windows and Linux, as we use both.
The standard Git-SVN checkout ignores the external property and hence the frob-latest
directory does not exist in checkouts, which breaks things.
On Linux, it is possible to manually create a symlink in the working copy, but this can only be propagated to other Linux users in a pure Git repository (as in the Git-SVN repository it would cause a conflict with the SVN external, and symlinks don't work with any of the Windows tools).
On Windows, it is possible to manually create a directory junction in the working copy, but this can't be propagated to any other users (and requires admin permissions to set up in the first place).
Git has a "submodules" concept, which on the surface sounds like an equivalent to svn:external
, but as far as I can tell they can only point at an entire repository, not a sub-path within a repository (in this case the same repository), so they're not useful for this application. They also seem like they're a lot more painful to work with than externals, but that might just be unfamiliarity.