garden-rs / garden

Garden grows and cultivates collections of Git trees ~ Official mirror of https://gitlab.com/garden-rs/garden
https://garden-rs.gitlab.io
MIT License
66 stars 9 forks source link

Garden grow doesn't do a full git clone #2

Closed mrosm20 closed 2 years ago

mrosm20 commented 2 years ago

the remotes branch aren't fetched when you perform a garden grow. you can't checkout a branch from the origin.

davvid commented 2 years ago

Good point, right now we have --depth=1 hard-coded in src/cmds/grow.rs.

That should be made opt-in via a new depth: 1 attribute instead.

In the meantime removing the hard-coded --depth=1 there is a good solution.

davvid commented 2 years ago

Thanks for the report. We now create full clones by default.

You can add depth: 1 to a tree (or template) configuration to enable shallow cloning. It's an integer, so depth: 42 will create a shallow clone of depth 42.