Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_cgit_type_url produces wrong URLs without project #66

Open
tastytea opened this issue Sep 27, 2022 · 0 comments · May be fixed by #67
Open

get_cgit_type_url produces wrong URLs without project #66

tastytea opened this issue Sep 27, 2022 · 0 comments · May be fixed by #67
Assignees
Labels
bug Something isn't working

Comments

@tastytea
Copy link

Describe the bug

URLs for repositories managed with cgit, for example https://git.kernel.org/, are missing the repository part. The URLs are <host>/tree/file instead of <host>/<repo>/tree/file.

To Reproduce

minimal init.lua:

local install_path = vim.fn.stdpath('data') ..
    '/site/pack/packer/start/packer.nvim'
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
    vim.fn.system({
        'git', 'clone',
        'https://github.com/wbthomason/packer.nvim', install_path
    })
    vim.cmd [[packadd packer.nvim]]
end

require('packer').startup({ function(use)
    use { 'https://github.com/wbthomason/packer.nvim' }
    use {
        'https://github.com/ruifm/gitlinker.nvim',
        requires = { 'https://github.com/nvim-lua/plenary.nvim' }
    }
end})

require("packer").sync()

require"gitlinker".setup()
  1. git clone https://git.kernel.org/pub/scm/docs/man-pages/man-pages-posix.git
  2. cd man-pages-posix && nvim README
  3. generate permalink
  4. permalink is https://git.kernel.org/tree/README?id=3032a293a74969989e3ed4921b690cf9442ac674#n1

Expected behavior

The permalink should be https://git.kernel.org/pub/scm/docs/man-pages/man-pages-posix.git/tree/README?id=3032a293a74969989e3ed4921b690cf9442ac674#n1

System (please complete the following information):

  • OS: Gentoo Linux
  • nvim --version: NVIM v0.7.2
  • git --version: git version 2.35.1
@tastytea tastytea added the bug Something isn't working label Sep 27, 2022
tastytea added a commit to tastytea/gitlinker.nvim that referenced this issue Sep 28, 2022
@tastytea tastytea linked a pull request Sep 28, 2022 that will close this issue
SanchayanMaity pushed a commit to SanchayanMaity/gitlinker.nvim that referenced this issue Feb 27, 2023
stevanmilic pushed a commit to stevanmilic/gitlinker.nvim that referenced this issue Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants