gpt4 book ai didi

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

转载 作者:太空狗 更新时间:2023-10-29 13:15:54 25 4
gpt4 key购买 nike

我正在使用 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com