[release/10.0.4xx] Preserve .git suffix in repository names when generating SourceLink URLs#1658
Merged
tmat merged 10 commits intorelease/10.0.4xxfrom Apr 27, 2026
Merged
Conversation
Do not strip the `.git` suffix from repository names in GetSourceLinkUrlGitTask. Some repositories legitimately include `.git` as part of their name, and removing the suffix produces incorrect SourceLink URLs and 404 responses. This change keeps `.git` when it is part of the repository name. Additionally update the GitWeb provider to avoid appending `.git` when the suffix is already present, preventing URLs like `repo.git.git`. Add regression tests for repository names ending with `.git`.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ty before returning it. The null-forgiving operator is used here to satisfy the nullable analysis.
The previous change modified the shared Git SourceLink task to preserve the `.git` suffix in repository names. This introduced regressions in other providers (e.g. Bitbucket and Common tests). The fix will be moved to the Azure Repos provider where the exact repository name is required by the Azure DevOps API, instead of changing the shared behavior for all providers.
…ies ending with .git Ensure that repository names ending with ".git" are not treated the same as repositories without the suffix and that the suffix is preserved in the generated SourceLink URL.
Fix build failure caused by accidentally duplicated test methods introduced while adding regression tests for repository names ending with `.git`.
Restore error comment – removal was unintentional.
tmat
approved these changes
Apr 27, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #1619 to release/10.0.4xx
/cc @tmat @Eales