Repository: junegunn/vim-plug

Issue #1005: Use the default branch instead of master when branch isn't set explicitly
Created: 2020-08-13T19:23:44Z
As several repositories are already moving away from having the default branch named master, I suggest that vim-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 from master to main as the default branch. A workaround to get things working was to rename the local branch inside .vim/plugged/govim but I recently noticed that vim-plug changes branch back to master if I don't have a branch name set.
i.e.
" This will give me the default branch instead of 'master'
Plug 'govim/govim' 

" .. while this still works
Plug 'govim/govim', { 'branch': 'development' }



VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jun  7 2020 01:33:04)
macOS version
Included patches: 1-916
Compiled by leitzler@machine.int.leitzler.net
Huge version without GUI.  Features included (+) or not (-):
+acl               +cryptv            +fork()            +modify_fname      +persistent_undo   +syntax            +visualextra
+arabic            -cscope            -gettext           +mouse             +popupwin          +tag_binary        +viminfo
+autocmd           +cursorbind        -hangul_input      -mouseshape        +postscript        -tag_old_static    +vreplace
+autochdir         +cursorshape       +iconv             +mouse_dec         +printer           -tag_any_white     +wildignore
-autoservername    +dialog_con        +insert_expand     -mouse_gpm         +profile           -tcl               +wildmenu
-balloon_eval      +diff              +ipv6              -mouse_jsbterm     -python            +termguicolors     +windows
+balloon_eval_term +digraphs          +job               +mouse_netterm     -python3           +terminal          +writebackup
-browse            -dnd               +jumplist          +mouse_sgr         +quickfix          +terminfo          -X11
++builtin_terms    -ebcdic            +keymap            -mouse_sysmouse    +reltime           +termresponse      -xfontset
+byte_offset       +emacs_tags        +lambda            +mouse_urxvt       +rightleft         +textobjects       -xim
+channel           +eval              +langmap           +mouse_xterm       -ruby              +textprop          -xpm
+cindent           +ex_extra          +libcall           +multi_byte        +scrollbind        +timers            -xsmp
-clientserver      +extra_search      +linebreak         +multi_lang        +signs             +title             -xterm_clipboard
+clipboard         -farsi             +lispindent        -mzscheme          +smartindent       -toolbar           -xterm_save
+cmdline_compl     +file_in_path      +listcmds          +netbeans_intg     -sound             +user_commands
+cmdline_hist      +find_in_path      +localmap          +num64             +spell             +vartabs
+cmdline_info      +float             -lua               +packages          +startuptime       +vertsplit
+comments          +folding           +menu              +path_extra        +statusline        +virtualedit
+conceal           -footer            +mksession         -perl              -sun_workshop      +visual
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X -DMACOS_X_DARWIN  -O2   -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc    -o vim        -lm -lncurses  -liconv -framework AppKit



Type:

 Bug
 Enhancement
 Feature Request
 Question


OS:

 All/Other
 Linux
 OS X
 Windows


Vim:

 Terminal Vim
 GVim
 Neovim

Duplicate issue #1023: PlugInstall "invalid reference to master"
Created: 2020-10-12T19:14:15Z
github is going through a renaming process where the default branch on many repos is changing from master to main  https://github.com/github/renaming. This appears to be a problem for plug, as it hardcodes the default branch as master. I experienced this when installing vim-svelte

I am guessing this is a bug for vim-plug and not for vim-svelte & any other repos accepting the naming change. This can be fixed by setting
Plug 'evanleck/vim-svelte', { 'branch': 'main' }
but I believe several packages will run into this issue going forward


:version
NVIM v0.4.2
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG
 -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion
-Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATE
D_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/tmp/neovim-20190916-88369-176iaxs
/neovim-0.4.2/build/config -I/tmp/neovim-20190916-88369-176iaxs/neovim-0.4.2/src -I/usr/local/include -I/tmp/neovim-20
190916-88369-176iaxs/neovim-0.4.2/deps-build/include -I/usr/local/opt/gettext/include -I/Applications/Xcode.app/Conten
ts/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/tmp/neovim-20190916-88369-176iaxs
/neovim-0.4.2/build/src/nvim/auto -I/tmp/neovim-20190916-88369-176iaxs/neovim-0.4.2/build/include
Compiled by brew@Mojave-2.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.4.2/share/nvim"

Run :checkhealth for more info



Type:

 Bug
 Enhancement
 Feature Request
 Question


OS:

 All/Other
 Linux
 OS X
 Windows


Vim:

 Terminal Vim
 GVim
 Neovim

Closing comment (2020-10-12T19:16:23Z): Duplicate of #1005. Comment there instead.