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

:PaqUpdate errors when branch points at a tag #173

Open
jose-elias-alvarez opened this issue Dec 27, 2024 · 0 comments
Open

:PaqUpdate errors when branch points at a tag #173

jose-elias-alvarez opened this issue Dec 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jose-elias-alvarez
Copy link

jose-elias-alvarez commented Dec 27, 2024

Describe the bug
Running :PaqUpdate when a plugin's branch points at a tag shows a message indicating that updating the plugin failed.

To Reproduce

  1. Install paq-nvim according to the README, then add the following plugin specification using the syntax suggested in [Feature Request] Support for tagging certain versions #144:
require("paq")({
    { "saghen/blink.cmp", branch = "v0.8.2" },
})
  1. Run :PaqInstall, which succeeds
  2. Restart Neovim and run :PaqUpdate
  3. Observe that an error message is displayed:
Paq: [0/1] Failed to update blink.cmp

Expected behavior
No error message is shown.

Environment:

  • nvim --version: 0.10.3
  • git --version: 2.47.1
  • OS: macOS Sequoia 15.2

Additional info

After the above operation, paq.log contains the following:

You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

It seems that git pull --recurse-submodules --update-shallow is failing because the repo is in a detached state, since the tag isn't backed by a branch. I'm not an expert, but I can imagine two solutions:

  1. Check if a tag is checked out and skip updating (i.e. consider the tag to be frozen, as if it pointed at a specific commit)
  2. Add --tags --force to the pull command (this seems to be what mini.deps does here, and it successfully handles this case)
@jose-elias-alvarez jose-elias-alvarez added the bug Something isn't working label Dec 27, 2024
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