git - svn2git 的 --svn-branches 参数的优缺点是什么

标签 git svn svn2git

我正在使用 svn2git ( the good one ) 将一些 SVN 存储库转换为 Git 存储库。
它有一个命令行参数 --svn-branches 记录在

Use the contents of SVN when creating branches, Note: SVN tags are branches as well

此命令行参数的优点缺点是什么。

是否只是没有它更快,因为只创建了一个 Git 标签,而不是转储整个工作树,并且拥有正确的状态更安全,因为整个工作树都被转储了,或者还有更多?

您会建议使用还是省略此参数?

最佳答案

MoveToGit/UsingSvn2Git手册页提到:

The recurse action is a hack to tell svn2git to recurse into a directory it has just copied or that existed because it is of interest.
Example: if we are importing kdelibs, it exists in trunk/KDE/kdelibs. At branching, someone did:

svn cp $SVNROOT/trunk/KDE $SVNROOT/branches/KDE/4.4

SVN recorded in that commit that branches/KDE/4.4 was the only path changed.
That means the rule

branches/KDE/[^/]+/kdelibs/

will not match.

We need to tell the tool that something interesting happened inside and it should recurse. Then it will apply again all rules to the files that exist at that point, at which point the rules will match.

我怀疑这个选项 --svn-branches 与“递归操作”有关

关于git - svn2git 的 --svn-branches 参数的优缺点是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36927939/

相关文章:

java - Eclipse 中项目的 SVN 问题

eclipse - Subversive 和 Eclipse - 提交后,它仍然显示传出的更改

git - 如何使用 svn2git 将 svn 存储库迁移到 git?

git - 是否可以将 SVN 分支转换为新的 GIT 存储库?

git-gui 报告它每次运行时都有 256 个松散对象,并建议进行压缩。如何解决?

git - 解决冲突后 git 仍然提示?

java - Git 存储库分支可以是其他 Git 存储库中的子文件夹吗?

git - 使用 ssh 进行远程 Git pull 会导致权限被拒绝(公钥)?

java - 使用 Subclipse 从 Eclipse 中删除 SVN 位置