Skip to content

Failure to check for updates in plugins checked out at a branch or tag #61

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

Open
phijor opened this issue Mar 26, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@phijor
Copy link

phijor commented Mar 26, 2025

Running :Pckr status displays failed to check for updates for Git plugins that are checked out at some branch or tag.

  • nvim --version:
NVIM v0.10.4
Build type: RelWithDebInfo
LuaJIT 2.1.1736781742
  • git --version: 2.48.1
  • Operating system/version: Arch Linux
> uname -ros
Linux 6.13.8-arch1-1 GNU/Linux
  • Terminal name/version: Alacritty 0.15.1

Steps to reproduce

  • add a plugin for which either tag or branch is set (cf. plugin spec below):
require('pckr').add {
  { "example/foo.nvim", tag = "*", },
  { "example/bar.nvim", branch = "0.1.x", },
}
  • run :Pckr status

Actual behaviour

The status window says that checking for updates failed:

 • foo.nvim:  (10.72ms) failed to check for updates
 • bar.nvim:  (5.33ms) failed to check for updates

Expected behaviour

The status window contains either no message, or a message saying that updates are available.

Analysis

With the specification below, I suspect that some calls to git rev-parse '@{upstream}' are failing.
Running git in the checked out repository for fidget.nvim, I get the following:

> git status
HEAD detached at v1.6.1
nothing to commit, working tree clean
> git rev-parse HEAD
b61e8af9b8b68ee0ec7da5fb7a8c203aae854f2e
> git rev-parse '@{upstream}'
fatal: HEAD does not point to a branch

Similar things are happening in the repository for telescope.nvim:

> git status
On branch 0.1.x
nothing to commit, working tree clean
> git rev-parse HEAD
a0bbec21143c7bc5f8bb02e0005fa0b982edc026
> git rev-parse '@{upstream}'
fatal: no upstream configured for branch '0.1.x'

pckr files

Plugin specification file
require('pckr').add {
  {
    "j-hui/fidget.nvim",
    tag = "*",
    config = function()
      require("fidget").setup()
    end,
  },
  {
    "nvim-telescope/telescope.nvim",
    branch = "0.1.x",
    requires = {
      "nvim-lua/popup.nvim",
      "nvim-lua/plenary.nvim",
    },
    config = function()
      require("telescope").setup()
    end,
  },
}
Pckr lock file
return {
  ["https://github.com/j-hui/fidget.nvim"] = { commit = "b61e8af9b8b68ee0ec7da5fb7a8c203aae854f2e" },
  ["https://github.com/nvim-telescope/telescope.nvim"] = { commit = "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
}
@phijor phijor added the bug Something isn't working label Mar 26, 2025
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

No branches or pull requests

1 participant