Skip to content

Commit d4300af

Browse files
Bene81ldennington
andauthored
Apply suggestions from code review.
Co-authored-by: Lessley Dennington <ldennington@github.com>
1 parent d4ec9de commit d4300af

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/shared/Core/UriExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ 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)) &&
105+
// Check whether the URL only contains hostname.
106+
// This usually means the host is on your local network.
107+
if (!string.IsNullOrWhiteSpace(host) &&
109108
!host.Contains("."))
110109
{
111110
yield return $"{schemeAndDelim}{host}";
111+
// If we have reached this point, there are no more subdomains to unfold, so exit early.
112112
yield break;
113113
}
114114

0 commit comments

Comments
 (0)