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

[qustion] is this a normal behaviour? #48

Closed
avma opened this issue Jan 20, 2021 · 4 comments
Closed

[qustion] is this a normal behaviour? #48

avma opened this issue Jan 20, 2021 · 4 comments

Comments

@avma
Copy link

avma commented Jan 20, 2021

Hi,
I followed your installation instructions, when checking the ~/.zgenom folders I'm getting this:
Screenshot from 2021-01-20 16-48-58
some sub folders has no names only underscores, is that normal? am i missing something here?
Thank you

@jandamm
Copy link
Owner

jandamm commented Jan 20, 2021

This is the expected behavior when you haven't specified a branch name.

zgenom load zsh-users/zsh-completions will create $ZGEN_DIR/zsh-users/zsh-completions/___.
zgenom load zsh-users/zsh-completions . master will create $ZGEN_DIR/zsh-users/zsh-completions/master.

Please have a look here

Do you have any other questions?

@avma
Copy link
Author

avma commented Jan 20, 2021

Grate, thanks Jan,
...Just a thought, would in not be better if you make you code go for master as default or, just halt and prompt the user for a branch?

@jandamm
Copy link
Owner

jandamm commented Jan 20, 2021

Every repo hosted on a git server has a HEAD (default branch). For years this was master and was changed (at least for new repos) to main. This branch can also be changed.

Hardcoding the branch to master wouldn't work for every repo since there are some repos which are using main instead of master. This would create issues.
Asking the user for a branch wouldn't make sense either since it can be provided if needed. (zgenom load <repo> . master)

If no branch is specified the default branch of the repository is used. Taking zsh-users/zsh-completions as an example, zgenom would use the branch master. If the branch gets renamed to main (or any other name) in the future you will continue to get updates.
To be clear the branch isn't ___ it is just a placeholder for zgenom to know that the user hasn't used a specific branch.

If you want to hardcode master please use zgenom load <repo> . master instead of zgenom load <repo>.

@avma
Copy link
Author

avma commented Jan 20, 2021

Thank you Jan, This perfectly clarifies it.

@avma avma closed this as completed Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants