Skip to content

fix(ssh): properly handle GIT_SSH_COMMAND#2119

Open
anondeveg wants to merge 1 commit intofolke:mainfrom
anondeveg:fix/respect-git-core.sshCommand
Open

fix(ssh): properly handle GIT_SSH_COMMAND#2119
anondeveg wants to merge 1 commit intofolke:mainfrom
anondeveg:fix/respect-git-core.sshCommand

Conversation

@anondeveg
Copy link
Copy Markdown

@anondeveg anondeveg commented Jan 16, 2026

First things first, i really appreciate your work on this excellent plugin. the codebase was intuitive, clean, and modularized enough for me to get to speed fast and start implementing the fix!

Description

this pull request fixed #2012
where if the user set a custom git.core.sshCommand lazy.nvim would just ignore it and use the hardcoded value of "ssh"

what i did:

  • 0 separated command arguments into a separate SSH_OPTIONS variable

  • 1 checked if there is an environment variable that should have the highest precedence, and if there is i would assing it to GIT_SSH_COMMAND

  • 2 else if the user configured a custom git.sshCommand i would acknowledge that and assign it to GIT_SSH_COMMAND

  • 3 else GIT_SSH_COMMAND would default to "ssh"

Related Issue(s)

Screenshots

fixed_lazy_nvim_2012

Properly handle GIT_SSH_COMMAND so it respects Git's core.sshCommand setting.
size/s
@github-actions github-actions Bot added the size/m Medium PR (<50 lines changed) label Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m Medium PR (<50 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Git's core.sshCommand option is clobbered

1 participant