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

Updating with vim-plug fails #741

Open
spapanik opened this issue Aug 2, 2024 · 4 comments
Open

Updating with vim-plug fails #741

spapanik opened this issue Aug 2, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@spapanik
Copy link

spapanik commented Aug 2, 2024

Description

catppuccin fails to update with vim-plug, as vim-plug tries to do a git pull. git pull fails because catppuccin tries to pull the tags, but stable is already exists and points to a different commit

    From https://github.com/catppuccin/nvim
     - [deleted]         (none)     -> origin/release-please--branches--main--components--catppuccin
    remote: Enumerating objects: 107, done.        
    remote: Counting objects: 100% (103/103), done.        
    remote: Compressing objects: 100% (15/15), done.        
    remote: Total 22 (delta 13), reused 11 (delta 6), pack-reused 0        
       0b5df9c..10eda02  main       -> origin/main
     ! [rejected]        stable     -> stable  (would clobber existing tag)
     * [new tag]         v1.8.0     -> v1.8.0```

### Neovim version

```markdown
NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1720049189

Terminal and multiplexer

konsole 24.05.2

Catppuccin version / branch / rev

only affects updates, not a specific version/branch/rev

Steps to reproduce

:PlugUpdate when there is an older version installed

Expected behavior

:PlugUpdate should update catppuccin

Actual behavior

Update fails with:

    From https://github.com/catppuccin/nvim
     - [deleted]         (none)     -> origin/release-please--branches--main--components--catppuccin
    remote: Enumerating objects: 107, done.        
    remote: Counting objects: 100% (103/103), done.        
    remote: Compressing objects: 100% (15/15), done.        
    remote: Total 22 (delta 13), reused 11 (delta 6), pack-reused 0        
       0b5df9c..10eda02  main       -> origin/main
     ! [rejected]        stable     -> stable  (would clobber existing tag)
     * [new tag]         v1.8.0     -> v1.8.0```

### Repro

```Lua
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "catppuccin/nvim",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("catppuccin")
-- add anything else here
@spapanik spapanik added the bug Something isn't working label Aug 2, 2024
@vollowx
Copy link
Collaborator

vollowx commented Aug 7, 2024

As I can see, both stable and 1.8.0 tags point to the same commit, and the given repro file uses lazy.nvim so I can't reproduce the issue. Can you try to remove the local directory of catppuccin/nvim and do :PlugInstall again?

@spapanik
Copy link
Author

spapanik commented Aug 9, 2024

This works indeed, this is my current workaround. It asked vim plug to allow doing a git pull --force (with a config option) but it was rejected.

@vollowx
Copy link
Collaborator

vollowx commented Aug 9, 2024

I'm not familiar with vim-plug so I think we can leave this issue open until the next release, and check if the same thing happens.

@vollowx
Copy link
Collaborator

vollowx commented Aug 10, 2024

@spapanik As version 1.9.0 is released, is this issue happening again?

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

2 participants