ZIm/crates/git_hosting_providers/src
Nils Koch 910531bc33
Check if additional git provider is not the original git provider (#26533)
Release Notes:

- N/A

Yesterday I worked on https://github.com/zed-industries/zed/pull/26482
and noticed afterwards that we have duplicated hosting providers if the
git remote host is "gitlab.com" and after the PR also for "github.com".
This is not a big problem, since the original providers are registered
first and therefore we first find a match with the original providers,
but I think we should address this nevertheless.

We initialize every hosting provider with the defaults here:

b008b2863e/crates/git_hosting_providers/src/git_hosting_providers.rs (L15-L24)

After that, we also register additional hosting providers:

b008b2863e/crates/git_hosting_providers/src/git_hosting_providers.rs (L30-L43)

If we do not check if the additional provider is not the original
provider, we will register the same provider twice.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-03-12 10:25:31 -04:00
..
providers Check if additional git provider is not the original git provider (#26533) 2025-03-12 10:25:31 -04:00
git_hosting_providers.rs Add detection of self hosted GitHub enterprise instances (#26482) 2025-03-11 21:46:17 -06:00
providers.rs git_hosting_providers: Add support for Chromium repositories (#24881) 2025-02-20 19:11:32 -05:00