-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58d8a6d
commit 37ccc42
Showing
2 changed files
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,11 @@ val GitRemote.httpUrl : URL? get() { | |
var url = firstUrl ?: return null | ||
|
||
url = url.trim() | ||
.removeSuffix(".git") | ||
|
||
// Azure supports a .git suffix on the repo name, so don't remove it. | ||
if (!url.contains("dev.azure")) { | ||
url = url.removeSuffix(".git") | ||
} | ||
|
||
// Do not try to remove the port if the URL uses the SSH protocol in the SCP syntax e.g. | ||
// '[email protected]:foo.git' as it does not support port definitions. Attempting to remove the port | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,11 @@ class RemoteTest { | |
Arguments.of( | ||
"xy://custom.gitlab.url/group/project.git", | ||
"http://custom.gitlab.url/group/project" | ||
) | ||
), | ||
Arguments.of( | ||
"http://[email protected]/ben-gibson/test/_git/test.git", | ||
"http://dev.azure.com/ben-gibson/test/_git/test.git" | ||
), | ||
) | ||
} | ||
|
||
|