From 90f794d01dd5f50404f8ef6e1d22377ba5180787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caleb=20=E3=83=84=20Everett?= Date: Fri, 28 Apr 2023 15:20:16 -0700 Subject: [PATCH] Detect git ssh protocols packer.nvim errors when installing `use { 'ssh://git.company/repo' }` I've tried `git@git.company/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 --- lua/packer/plugin_utils.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/packer/plugin_utils.lua b/lua/packer/plugin_utils.lua index f7ec8780c..69ea79fd6 100644 --- a/lua/packer/plugin_utils.lua +++ b/lua/packer/plugin_utils.lua @@ -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