fix<Branch>: 修复打开 git svn clone 的 SVN 仓库 崩溃的问题(注意,目前还不支持提交到远程仓库)

This commit is contained in:
ZCShou 2021-02-05 20:07:03 +08:00
parent 643368c6c9
commit f4a51c79ea

View file

@ -106,7 +106,11 @@ namespace SourceGit.Git {
branch.IsLocal = true;
} else if (refname.StartsWith(remotePrefix, StringComparison.Ordinal)) {
var name = refname.Substring(remotePrefix.Length);
if (name.Contains("/")) {
branch.Remote = name.Substring(0, name.IndexOf('/'));
} else {
branch.Remote = name;
}
branch.Name = name;
branch.IsLocal = false;
remoteBranches.Add(refname);