nvim-neorocks / rocks-git.nvim

Use rocks.nvim to install plugins from git!
GNU General Public License v3.0
44 stars 2 forks source link

Sourcehut doesn't support HTTPS access when adding ".git" at the end #21

Closed danyspin97 closed 6 months ago

danyspin97 commented 6 months ago

The plugin lsp_lines.nvim is either accessible via:

However, sourcehut doesn't allow https://git.sr.ht/~whynothugo/lsp_lines.nvim.git, making rocks-git.nvim to fail.

I think that checking .git is good to prevent git running on random websites, but at the same time it requires a new requisite (adding .git at the end of an HTTPS repository) which many users are not used to and also create this issue.

mrcjkb commented 6 months ago

Hey :wave:

thanks for reporting. I guess I could lift the constraint of URLs having to end with .git and then use git ls-remote <url> to check if it's a URL that can be fetched with git.

mrcjkb commented 6 months ago

Actually, using git ls-remote would be terrible for performance, especially since it can't be used somewhere where it's called asynchronously. For now, I'm going to hard code sourcehut support.

danyspin97 commented 6 months ago

Thank you for the fast fix 😄