Skip to content

Commit

Permalink
Detect git ssh protocols
Browse files Browse the repository at this point in the history
packer.nvim errors when installing `use { 'ssh://git.company/repo' }`
I've tried `[email protected]/repo`, `https://git.company/repo`,
`git://git.company/repo`. None of these urls work with packer or with
`git clone`.

ssh, git+ssh, ssh+git are all names for git's ssh protocol. I tested
this locally and I'm able to install the package.

https://git.kernel.org/pub/scm/git/git.git/tree/connect.c?id=c05186cc38ca4605bff1f275619d7d0faeaf2fa5
  • Loading branch information
Caleb ツ Everett authored and lewis6991 committed Aug 18, 2023
1 parent e7bb7f1 commit 90f794d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/packer/plugin_utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ plugin_utils.guess_type = function(plugin)
plugin.type = plugin_utils.local_plugin_type
elseif
string.sub(plugin.path, 1, 6) == 'git://'
or string.sub(plugin.path, 1, 6) == 'ssh://'
or string.sub(plugin.path, 1, 10) == 'git+ssh://'
or string.sub(plugin.path, 1, 10) == 'ssh+git://'
or string.sub(plugin.path, 1, 4) == 'http'
or string.match(plugin.path, '@')
then
Expand Down

0 comments on commit 90f794d

Please sign in to comment.