-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Use the default branch instead of master when branch isn't set explicitly #1005
Comments
Also see #854. |
Oh, thanks. I did look through the issues but must have missed it, apologies for that! With regards to the current work by GitHub related to this, it might be time to give it another round of thoughts? |
from #854 (comment):
FWIW - It seems like |
This is an excellent tip in general, but seems like the perfect solution here? |
Fixed in #1007 |
I suggest re-opening this as per #1007 (comment) |
@leitzler Are you interested in sending a pull request? |
@junegunn I don't think I know vimscript well enough to get it right unfortunately (and I seem to have missed the notification for this one, sorry about it). Revisited this since a govim user recently ran into this issue again. |
I would say this is more of a bug than a feature, because I can't install a third of the required plugins. |
@mangelozzi: What do you mean? Can you give an example of a plugin you 'can't install' due to this issue (incl. the corresponding section from your config)? |
From #1007 (comment)
This is probably the only way to solve the changed default branch problem. It will make the update slower though. |
Fix #1005 vim-plug will now run `git remote set-head origin -a` on PlugUpdate to keep track of the default branch of the origin, so that it can still update even if the default branch has changed. This additional command will slow down the update process, but this is the unavoidable price to pay for the correctness of the task. However, vim-plug will run checkout and merge commands in parallel, so this improvement will slightly offset the slowdown.
Fix #1005 vim-plug will now run `git remote set-head origin -a` on PlugUpdate to keep track of the default branch of the origin, so that it can still update a plugin even if its default branch has changed. This additional command will slow down the update process, but this is an unavoidable price to pay for the correctness of the task. However, vim-plug will run checkout and merge commands in parallel, so this improvement will slightly offset the slowdown.
As several repositories are already moving away from having the default branch named
master
, I suggest thatvim-go
should use the repository default branch when the user hasn't explicitly set a branch.I'm using https://github.com/govim/govim (installed via
vim-plug
) that recently changed frommaster
tomain
as the default branch. A workaround to get things working was to rename the local branch inside.vim/plugged/govim
but I recently noticed thatvim-plug
changes branch back tomaster
if I don't have a branch name set.i.e.
The text was updated successfully, but these errors were encountered: