Open FredDeschenes opened 4 years ago
@FredDeschenes This is surely late, but you can specify a branch or tag you want to clone with antigen bundle
(RTFM https://github.com/zsh-users/antigen/wiki/Commands).
Example: antigen bundle org/repo@main
Would it make sense for antigen to just not assume the default branch of the repo is called master
?
It's somewhat user-hostile to have the user figure out what the default branch of a repo is, instead of infering it from the repo itself.
Having any branch as the default branch is a git feature.
FTR: Commonly used plugins from @unixorn have moved to main
FWIW, you can detect the default branch with
git remote show origin | awk '$0 ~ \"HEAD branch\" {print $NF}'
Would be really nice if at least we could have by default main
as an accepted alternative to master
Yes please! Especially since that's the default on modern git and github
I think it's best to use git remote show origin | awk '$0 ~ \"HEAD branch\" {print $NF}'
to find a given repo's default branch. Otherwise there will still be an issue when you come across a repo that used something like primary
instead of main
when they moved off of master
.
There is also a problem with already installed bundles. If you change the branch from master
to main
you have to update your config.
There is a way to get a default branch in git repo: https://github.com/gko/dotfiles/blob/491cb022e07e8ba20cd8cb90fce0fdaebc2439b0/.gitconfig#L62
Description
Title pretty much says it all. Antigen seems to rely on the fact that a repository has a 'master' branch and with Github's new default repository setup that uses 'main' instead (or any repository that changed their 'master' branch to 'main') installing/updating those plugins fails.
Steps to reproduce
Minimal steps to reproduce this behavior. Example:
Expected behavior:
Software version
antigen version
Antigen develop (d1dd78b) Revision date: 2018-01-15 14:37:21 -0300zsh --version
zsh 5.8 (x86_64-ubuntu-linux-gnu)uname -a
Linux poste-0948 5.4.0-51-generic #56-Ubuntu SMP Mon Oct 5 14:28:49 UTC 2020 x86_64 x86_64 x86_64 GNU/LinuxConfiguration
.antigenrc
Not used.zshrc
Entire file is here, but line 69 is where my theme that causes the issue is set.More information
As a workaround you can manually clone/update your plugins in $ANTIGEN_BUNDLES (Antigen still creates the directory structure, just doesn't perform the clone/pull).