Thanks for your project Anders. I've just started using Homeshick and find it really useful (still WIP: https://github.com/gerardbosch/dotfiles)
I see the homeshick clone and homeshick pull commands initializes recursively submodules.
- In case of clone:
git clone --recursive
- In case of pull:
git pull && git submodule update --recursive --init
Do you think it would make sense to perform the following with --depth=1 instead?
- clone case:
git clone && git submodule update --init --recursive --depth=1 (here clone and update are split to achieve depth=1)
- pull case:
git pull && git submodule update --init --recursive --depth=1
(I'm not very sure if other commands would be affected).
Rationale:
Sometimes submodules can come with a huge history, adding unnecessary MB.
I see that for example, Zsh package manager Antigen, clones packages (they call them bundles) by doing --depth=1. I've thought it may make sense for Homeshick as well.
For example, I added bash-it as a submodule to my dotfiles. In the Github's bash-it README, they instruct you to clone the project with --depth=1. The problem here is that now that this submodule sits in my dot files, it grows from 4,8MB to 44MB if I do homeshick pull (or if I do homeshick clone in another account/machine). This is just an example, but will happen with any other project with heavy-sized histories OR heavy recursive modules.
I could provide a PR if necessary.
--
I also have a side question (more anecdotically): Do you know if is there any way to configure Git to "ignore initialization" of certain submodules (like test libraries) on git submodule update? Following the same example, bash-it comes with some other submodules for testing the project:
bash-it/test_lib/bats-assert
bash-it/test_lib/bats-core
bash-it/test_lib/bats-file
bash-it/test_lib/bats-support
I mean, nested submodules in repos that are out of my control. I guess adding ignore = dirty and update = none in its .gitmodules would make it, but not very sure.
They are lightweight in this case (even though could be not), but I don't think I actually need these test dependencies (they are actually not initialized if I just do git clone .../bash-it.git). Maybe this would be already mitigated also using the --depth=1 in homeshick clone/pull.
Thanks!
Thanks for your project Anders. I've just started using Homeshick and find it really useful (still WIP: https://github.com/gerardbosch/dotfiles)
I see the
homeshick cloneandhomeshick pullcommands initializes recursively submodules.git clone --recursivegit pull && git submodule update --recursive --initDo you think it would make sense to perform the following with
--depth=1instead?git clone && git submodule update --init --recursive --depth=1(here clone and update are split to achieve depth=1)git pull && git submodule update --init --recursive --depth=1(I'm not very sure if other commands would be affected).
Rationale:
Sometimes submodules can come with a huge history, adding unnecessary MB.
I see that for example, Zsh package manager Antigen, clones packages (they call them bundles) by doing
--depth=1. I've thought it may make sense for Homeshick as well.For example, I added
bash-itas a submodule to my dotfiles. In the Github's bash-it README, they instruct you to clone the project with--depth=1. The problem here is that now that this submodule sits in my dot files, it grows from 4,8MB to 44MB if I dohomeshick pull(or if I dohomeshick clonein another account/machine). This is just an example, but will happen with any other project with heavy-sized histories OR heavy recursive modules.I could provide a PR if necessary.
--
I also have a side question (more anecdotically): Do you know if is there any way to configure Git to "ignore initialization" of certain submodules (like test libraries) on
git submodule update? Following the same example,bash-itcomes with some other submodules for testing the project:I mean, nested submodules in repos that are out of my control. I guess adding
ignore = dirtyandupdate = nonein its.gitmoduleswould make it, but not very sure.They are lightweight in this case (even though could be not), but I don't think I actually need these test dependencies (they are actually not initialized if I just do
git clone .../bash-it.git). Maybe this would be already mitigated also using the--depth=1inhomeshick clone/pull.Thanks!