One of the great features of subgit is that it is not limited to immediate migration but can support an indefinitely long transition period where the repository can be used with both svn and git clients side by side.
This does not work, however, with git submodules.
I am not asking for subgit to automatically convert svn externals to submodules - just for it to be capable of representing submodules within the source svn repository. The .gitmodules file can be stored as a regular file but the “commit” object cannot. I suggest representing it as an empty directory in svn with a custom property containing the commit hash. It could also have an svn externals property, of course.
Another feature that might help is in the opposite direction: something that can be represented in svn but not in git. I am referring to empty directories. Build scripts will often fail because output directories are missing. While this is trivial to fix later, it hurts the first-time experience of “wow, it just works”. This can be implemented by placing an empty .gitignore file in the git representation of empty svn directories. This should be an optional checkbox, off by default.
Thank you for your input! The externals vs. submodules case, as well as migrating empty directories from SVN have been a problem for many SubGit/SVN Mirror users. So we’ve been considering these features for a while.
As a small step towards the solution, we have developed a new tool - Git X-Modules. It doesn’t convert submodules to SVN, but it brings some svn:externals features to Git and avoids many disadvantages of git submodules. Would you be interested in checking it out?
Git submodules definitely have their issues, and I am sure whatever you have is superior. But we have them under control with some scripts and git hooks. I am interested in consolidating, not adding yet another tool. Just a method for storing a ‘commit’ object on the svn side is all I need.
Some other things I think could be useful:
A script that emulates some of the svn cli on top of a git repo. Many build and packaging scripts and CI procedures call the scm cli to find the current revision, branch, tag, etc. Adding such a script to the beginning of the PATH could help such scripts run “out of the box” after svn to git conversion.
A script for generating an author mapping from the system user database or an LDAP directory. I think a convenient place to store this would be in svn the repository itself, to be picked to automatically during conversion. The file can be stored in standard .mailmap format (https://git-scm.com/docs/gitmailmap).