Skip to content

Commit a14a300

Browse files
committed
Allowing host names only now.
1 parent 46d1b3c commit a14a300

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/shared/Core/UriExtensions.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@ public static IEnumerable<string> GetGitConfigurationScopes(this Uri uri)
102102
}
103103
}
104104

105+
// check whether the host specification contains of hostname only
106+
// this usually means, the git hosting instance is part of your local
107+
// network.
108+
if (!(string.IsNullOrWhiteSpace(host) || string.IsNullOrEmpty(host)) &&
109+
!host.Contains("."))
110+
{
111+
yield return $"{schemeAndDelim}{host}";
112+
yield break;
113+
}
114+
105115
// Unfold the host by sub-domain, left-to-right
106116
while (!string.IsNullOrWhiteSpace(host))
107117
{

0 commit comments

Comments
 (0)