Git svn 克隆生成空目录

Git svn clone produces empty directory

我正在尝试在 http://svn.openstreetmap.org/applications/editors/josm 克隆 SVN 存储库,当我执行 svn co http://svn.openstreetmap.org/applications/editors/josm 时它工作正常,但如果我执行 git svn clone -s http://svn.openstreetmap.org/applications/editors/josm 它会生成一个 josm 目录里面只有一个 .git 目录。有什么我想念的吗?这是命令的输出:

$ git svn clone -s http://svn.openstreetmap.org/applications/editors/josm
WARNING: --prefix is not given, defaulting to empty prefix.
         This is probably not what you want! In order to stay compatible
         with regular remote-tracking refs, provide a prefix like
         --prefix=origin/ (remember the trailing slash), which will cause
         the SVN-tracking refs to be placed at refs/remotes/origin/*.
NOTE: In Git v2.0, the default prefix will change from empty to 'origin/'.
Initialized empty Git repository in /tmp/josm/.git/
Using higher level of URL: http://svn.openstreetmap.org/applications/editors/josm => http://svn.openstreetmap.org
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: '/!svn/rvr/100' path not found: Additional errors:: File not found: revision 100, path '/applications/editors/josm'
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories

$ cd josm; git reflog
fatal: bad default revision 'HEAD'

您使用了错误的选项 -s,它告诉 git-svn 期望标准 svn 存储库布局(主干、分支/*、标签/*),而您尝试克隆的存储库不会好像有这样的尝试

git svn clone http://svn.openstreetmap.org/applications/editors/josm

相反。