mattmc3 / antidote

https://getantidote.github.io - the cure to slow zsh plugin management
MIT License
915 stars 22 forks source link

Changing the branch annotation does not change the branch on an already cloned repo #5

Open mattmc3 opened 2 years ago

mattmc3 commented 2 years ago

If you go from antidote bundle zsh-users/zsh-autosuggestions branch:develop to antidote bundle zsh-users/zsh-autosuggestions, your repo's branch does not change.

mattmc3 commented 2 years ago

Note: I think antibody has this bug too. The solution is probably to clone to a different directory for each branch since you could (weirdly) bundle the same repo multiple times with different branches.

mattmc3 commented 2 years ago

This is a tricky bug because you need to get the default branch on every repo. Something like this: dfltbr=$(git symbolic-ref --short refs/remotes/origin/HEAD); echo ${dfltbr#*/}

devnoname120 commented 5 days ago

The solution is probably to clone to a different directory for each branch since you could (weirdly) bundle the same repo multiple times with different branches.

If you opt for this solution I suggest you to implement it before releasing v2.0 which already contains breaking changes so as to avoid breaking things twice in a row.