From f4a51c79eaaf04929996fd23a7d6cfd383e32e7f Mon Sep 17 00:00:00 2001 From: ZCShou <72115@163.com> Date: Fri, 5 Feb 2021 20:07:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=89=93?= =?UTF-8?q?=E5=BC=80=20git=20svn=20clone=20=E7=9A=84=20SVN=20=E4=BB=93?= =?UTF-8?q?=E5=BA=93=20=E5=B4=A9=E6=BA=83=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=88=E6=B3=A8=E6=84=8F=EF=BC=8C=E7=9B=AE=E5=89=8D=E8=BF=98?= =?UTF-8?q?=E4=B8=8D=E6=94=AF=E6=8C=81=E6=8F=90=E4=BA=A4=E5=88=B0=E8=BF=9C?= =?UTF-8?q?=E7=A8=8B=E4=BB=93=E5=BA=93=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Git/Branch.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Git/Branch.cs b/src/Git/Branch.cs index 36e16af3..fd1030c0 100644 --- a/src/Git/Branch.cs +++ b/src/Git/Branch.cs @@ -106,7 +106,11 @@ namespace SourceGit.Git { branch.IsLocal = true; } else if (refname.StartsWith(remotePrefix, StringComparison.Ordinal)) { var name = refname.Substring(remotePrefix.Length); - branch.Remote = name.Substring(0, name.IndexOf('/')); + if (name.Contains("/")) { + branch.Remote = name.Substring(0, name.IndexOf('/')); + } else { + branch.Remote = name; + } branch.Name = name; branch.IsLocal = false; remoteBranches.Add(refname);