Filter common git hosting providers from SSH config hosts#51528
Conversation
|
@injust this PR needs another review. |
|
Thanks for this, @sarmadgulzar! I pushed a revision with some structural changes:
All existing tests pass unchanged. Let me know what you think! |
|
I'm gonna go ahead and merge this, but feel free to leave any feedback on my additions, and we can fix forward if there's anything I did that we want to change. |
|
By the way: Thanks so much!!! |
|
@nathansobo looks good, thanks! |
|
Thank you @sarmadgulzar! |
…ries#51528) Fixes zed-industries#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>
…ries#51528) Fixes zed-industries#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>
…ries#51528) Fixes zed-industries#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>
Fixes #50218
Hostblock: collect its host patterns (handling continuations and filtering!/*/\), remember anyHostname.Hostnameis a git provider → discard everything.Hostnameexists → keep all host aliases.Added more extensive test coverage as well to cover the above!
Release Notes: