# Filter common git hosting providers from SSH config hosts \(\#51528\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/3dd2e80ec50e23077ac1b8bca37ff7ae2f719e95)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 3dd2e80ec50e23077ac1b8bca37ff7ae2f719e95

Requested commit: 3dd2e80ec50e23077ac1b8bca37ff7ae2f719e95

Commit: 3dd2e80ec50e23077ac1b8bca37ff7ae2f719e95

Tree: 934b4799b4fd09b9de31091c7f180de68a6c33f1

Author: Sarmad Gulzar

Committer: GitHub

## Message

```
Filter common git hosting providers from SSH config hosts (#51528)

Fixes https://github.com/zed-industries/zed/issues/50218

- For every `Host` block: collect its host patterns (handling
continuations and filtering `!`/`*/\`), remember any `Hostname`.
- When the block ends: if `Hostname` is a git provider → discard
everything.
- Else if `Hostname` exists → keep all host aliases.
- Else → keep only the host aliases that are not git providers.

Added more extensive test coverage as well to cover the above!

Release Notes:

- Fixed SSH host picker showing git provider domains (e.g. github.com,
gitlab.com) from SSH config.

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
```

## Parents

- [7340835769910d362c31fff5eafa5157c4d4a63f](https://git.cafe/gitcafe/zed/commit/7340835769910d362c31fff5eafa5157c4d4a63f?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/3dd2e80ec50e23077ac1b8bca37ff7ae2f719e95?format=markdown)
