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

Fix PlugClean error when the default branch has changed #1269

Merged
merged 1 commit into from
Mar 5, 2024
Merged

Conversation

junegunn
Copy link
Owner

@junegunn junegunn commented Mar 3, 2024

Fix #1253

@junegunn
Copy link
Owner Author

junegunn commented Mar 5, 2024

I was able to trigger the code by removing .git/refs/heads/master.

x vim-xxx:
    Failed to compare with the origin. The default branch might have changed.
    PlugClean required.

@junegunn junegunn merged commit e2974a3 into master Mar 5, 2024
1 check passed
@junegunn junegunn deleted the fix-1253 branch March 5, 2024 07:13
@junegunn
Copy link
Owner Author

junegunn commented Mar 5, 2024

See #1005 for the discussion on automatic update of the default branch.

@adamency
Copy link

@junegunn Hi. I have read the threads, #1005 and #1272, but this fails to answer my question.

Can you please clarify this error message ?

"Failed to compare with the origin. The default branch might have changed.\nPlugClean required."

As per your own documentation:

`PlugClean[!]`                       | Remove unlisted plugins (bang version will clean without prompt)

but your error message tells about using PlugClean in the context of installed plugins, so either your code has changed and PlugClean is doing something else/more now, or your error message is wrong or missing some explanation.

Basically, my comment boils down to the fact that I was running PlugStatus to check the status of my plugins after the update of vim-plug itself via PlugUpgrade (which was supposed to solve the default branch issue), when I got this error message for all my installed plugins. However I do not want to remove the unlisted plugins from the filesystem and I still want to correct the PlugStatus.

Please provide information to better understand the issue and solve it.

@junegunn
Copy link
Owner Author

junegunn commented Apr 17, 2024

@adamency

when I got this error message for all my installed plugins.

All plugins? That doesn't sound right. Please open a new issue explaining the problem, with the plug section of your Vim configuration, screenshots, git --version, etc.

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

Successfully merging this pull request may close these issues.

PlugClean fails to recover when remote renamed default branch
2 participants