Skip to content

Commit

Permalink
fix: force Git fetch during updates
Browse files Browse the repository at this point in the history
Ensures packer updates don't fail when upstream force-pushes tags.
  • Loading branch information
antoineco authored and lewis6991 committed Aug 18, 2023
1 parent 1d0cf98 commit 12c8a0f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions doc/packer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions lua/packer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 12c8a0f

Please sign in to comment.