Closed antoineco closed 1 year ago
Due to the condition: https://github.com/wbthomason/packer.nvim/blob/64ae65fea395d8dc461e3884688f340dd43950ba/lua/packer/plugin_types/git.lua#L221-L223
The fetch
command also needs to be --force
, like:
fetch = 'fetch --depth 999999 --progress --force',
@overhacked ~in what context have you been running into issues with the fetch
command?~
Edit: I just saw your comment on the original issue. Good point.
@antoineco @overhacked Thanks, and sorry for the delay here. If we're to merge this, we should add @overhacked's suggested change.
Also, are there cases where --force
might not do what we want? I don't know of any (as you say, users typically just want "get the latest" or "get the thing I specified", and afaik --force
will do the right thing in these cases), but I don't entirely trust my knowledge of git
to be exhaustive enough here.
@wbthomason absolutely 👍 Done in e1979615..3a4fff64
@wbthomason @antoineco Not sure why this got closed? #1100 is still open; I posted my enthusiastic agreement (https://github.com/wbthomason/packer.nvim/issues/1100#issuecomment-1657036413) with this PR's approach there. I'm closing #1171; it would over-complicate the matter.
@overhacked it was closed because you disagreed with the approach in the original issue and opened #1171 instead.
I have since deleted my fork and no longer use packer, but by any mean feel free to re-submit.
Understood. I was wrong about the approach being harmful. I'll resubmit.
Fixes #1100
I believe
--force
is a sensible default in the context ofpacker
updates. In most cases, users don't care about things such as force-pushed tags, and simply want packer to pull whatever Git ref was indicated in their config.