pckr.nvim icon indicating copy to clipboard operation
pckr.nvim copied to clipboard

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

Open phijor opened this issue 1 year ago • 0 comments

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 avatar Mar 26 '25 10:03 phijor