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

Allow to clone without submodules #9

Merged
merged 2 commits into from
Oct 5, 2020

Conversation

jandamm
Copy link
Owner

@jandamm jandamm commented Sep 21, 2020

In my opinion the load syntax is a bit overloaded already. Also adding
other commands like bin would have to implement this in multiple
places.
This can however be achieved like this:

zgen clone <repo> --no-submodules
zgen load <repo>

Closes tarjoilija/zgen#129

In my opinion the `load` syntax is a bit overloaded already. Also adding
other commands like `bin` would have to implement this in multiple
places.
This can however be achieved like this:

```zsh
zgen clone <repo> --no-submodules
zgen load <repo>
```

Closes tarjoilija/zgen#129
@AndydeCleyre
Copy link

Nice!

Questions:

  • zgen clone should only be run once per repo, not used in .zshrc, right?
  • what happens regarding submodules of such-cloned repos after a zgen update?

@jandamm
Copy link
Owner Author

jandamm commented Oct 5, 2020

zgen clone can be used in the .zshrc and should be used if you want to clone without submodules.
When the repository is already cloned, it won't do anything.
So this is totally save and would only clone once:

# This would clone powerlevel10k without submodules and then source it.
zgen clone romkatv/powerlevel10k --no-submodules
zgen load romkatv/powerlevel10k powerlevel10k
# This would clone powerlevel10k with submodules and then source it.
zgen clone romkatv/powerlevel10k
zgen load romkatv/powerlevel10k powerlevel10k

The short form of this is zgen load romkatv/powerlevel10k powerlevel10k

I haven't thought about zgen update. Right now it will initialize submodules. I'll fix this soon 👍

By adding `zgen clone ... --no-submodules` there is a way to not clone
submodules. So updating should not initialize submodules either.
@jandamm
Copy link
Owner Author

jandamm commented Oct 5, 2020

zgen update doesn't initialize submodules anymore 👍

@AndydeCleyre
Copy link

Looks great, thanks!

@jandamm jandamm merged commit d97eb67 into main Oct 5, 2020
@jandamm jandamm deleted the Allow-to-clone-without-submodules branch October 5, 2020 20:36
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

Successfully merging this pull request may close these issues.

Request: new load syntax for _not_ cloning submodules
2 participants