From 12c8a0f4f07f77e902e84f18a3ebbc138eb582b9 Mon Sep 17 00:00:00 2001 From: Antoine Cotten Date: Wed, 19 Oct 2022 17:31:10 +0200 Subject: [PATCH] fix: force Git fetch during updates Ensures packer updates don't fail when upstream force-pushes tags. --- README.md | 4 ++-- doc/packer.txt | 4 ++-- lua/packer.lua | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e1a3c41..36ee7e5 100644 --- a/README.md +++ b/README.md @@ -301,9 +301,9 @@ default configuration values (and structure of the configuration table) are: git = { cmd = 'git', -- The base command for git operations subcommands = { -- Format strings for git subcommands - update = 'pull --ff-only --progress --rebase=false', + update = 'pull --ff-only --progress --rebase=false --force', install = 'clone --depth %i --no-single-branch --progress', - fetch = 'fetch --depth 999999 --progress', + fetch = 'fetch --depth 999999 --progress --force', checkout = 'checkout %s --', update_branch = 'merge --ff-only @{u}', current_branch = 'branch --show-current', diff --git a/doc/packer.txt b/doc/packer.txt index 01d5c19..23d15dc 100644 --- a/doc/packer.txt +++ b/doc/packer.txt @@ -215,9 +215,9 @@ default values: >lua git = { cmd = 'git', -- The base command for git operations subcommands = { -- Format strings for git subcommands - update = 'pull --ff-only --progress --rebase=false', + update = 'pull --ff-only --progress --rebase=false --force', install = 'clone --depth %i --no-single-branch --progress', - fetch = 'fetch --depth 999999 --progress', + fetch = 'fetch --depth 999999 --progress --force', checkout = 'checkout %s --', update_branch = 'merge --ff-only @{u}', current_branch = 'branch --show-current', diff --git a/lua/packer.lua b/lua/packer.lua index ff2b93a..7cef1fc 100644 --- a/lua/packer.lua +++ b/lua/packer.lua @@ -27,10 +27,10 @@ local config_defaults = { mark_breaking_changes = true, cmd = 'git', subcommands = { - update = 'pull --ff-only --progress --rebase=false', + update = 'pull --ff-only --progress --rebase=false --force', update_head = 'merge FETCH_HEAD', install = 'clone --depth %i --no-single-branch --progress', - fetch = 'fetch --depth 999999 --progress', + fetch = 'fetch --depth 999999 --progress --force', checkout = 'checkout %s --', update_branch = 'merge --ff-only @{u}', current_branch = 'rev-parse --abbrev-ref HEAD',