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

Allow pull with --force #1279

Open
4 of 11 tasks
spapanik opened this issue Apr 30, 2024 · 5 comments
Open
4 of 11 tasks

Allow pull with --force #1279

spapanik opened this issue Apr 30, 2024 · 5 comments

Comments

@spapanik
Copy link

As there are plugins that clobber the latest or stable or similar tags, they fail at update (for example catppuccin/nvim). The solution is for me to go to ~/.local/share/nvim/plugged/, find the offending plugin, and do a git pull --force. I was wondering if there is the option to do it from :PlugUpdate, and if not I would like to make a feature request for this.


" Main plugins
Plug 'dense-analysis/ale'
Plug 'jiangmiao/auto-pairs'
Plug 'jlanzarotta/bufexplorer'
Plug 'catppuccin/nvim', {'as': 'catppuccin'}
Plug 'github/copilot.vim'
Plug 'Shougo/deoplete.nvim', {'do': ':UpdateRemotePlugins'}
Plug 'bogado/file-line'
Plug 'junegunn/fzf', {'dir': '~/.fzf', 'do': './install --bin'}
Plug 'jparise/vim-graphql'
Plug 'autozimu/LanguageClient-neovim', {'branch': 'next', 'do': 'bash install.sh'}
Plug 'preservim/nerdtree'
Plug 'lambdalisue/suda.vim'
Plug 'ervandew/supertab'
Plug 'leafgarland/typescript-vim'
Plug 'SirVer/ultisnips'
Plug 'vim-airline/vim-airline'
Plug 'moll/vim-bbye'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-fugitive'
Plug 'hynek/vim-python-pep8-indent'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-speeddating'
Plug 'cespare/vim-toml'
Plug 'editorconfig/editorconfig-vim'
Plug 'zah/nim.vim'

" Plugin extras
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'junegunn/fzf.vim'
Plug 'vim-airline/vim-airline-themes'
Plug 'honza/vim-snippets'
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1713773202

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"
  • Type:
    • Bug
    • Enhancement
    • Feature Request
    • Question
  • OS:
    • All/Other
    • Linux
    • macOS
    • Windows
  • Vim:
    • Terminal Vim
    • GVim
    • Neovim
@junegunn
Copy link
Owner

As there are plugins that clobber the latest or stable or similar tags, they fail at update (for example catppuccin/nvim).

It's not clear why they fail to update. Can you be more specific? You're not specifying the tag in the Plug command, so they shouldn't affect the git pull process.

@spapanik
Copy link
Author

My global git configuration automatically pulls and prunes tags, which is the configuration that makes sense for the repos that I'm working with.

I found an installation that I haven't manually force pulled catpuccin. This is the error I'm getting:

x catppuccin:
    From https://github.com/catppuccin/nvim
     ! [rejected]        stable     -> stable  (would clobber existing tag)

When I go to ~/.local/share/nvim/plugged/catppuccin and I delete the offending tag, it updates fine.

@junegunn
Copy link
Owner

junegunn commented Jun 1, 2024

My global git configuration automatically pulls and prunes tags

Can you show me the config?

@spapanik
Copy link
Author

spapanik commented Jun 4, 2024

The two parts in the config are:

[remote "origin"]
    tagOpt = --tags
[fetch]
    pruneTags = true

@junegunn
Copy link
Owner

junegunn commented Jun 5, 2024

Thanks for the clarification. I think this is a very rare case; an unorthodox use of tags (they should be maintaining stable branch instead) combined with a non-default global git option of yours.

vim-plug has been extremely stable and is not expected to change much in the near future, so I suggest that you add --force to your local copy of plug.vim, instead we add an option that few people will use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants