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

Utilize shallow submodules for bootstrap and Font-Awesome. #269

Merged
merged 2 commits into from Nov 4, 2021

Conversation

johnpaulett
Copy link
Contributor

Avoids each end user needing to pass arguments to git clone / git submodule.

Reduces checkout size from 337M to 239M, and clone --recurse-submodules time
from 56s to 33s on personal laptop.

To do a similar operation without shallow = true, the user would have to do:
git clone --shallow-submodules --recurse-submodules

or:
git submodule update --init --recursive --depth=1

shallow = true added to git 2.10 (Q3 2016)

I believe this will assist end users of docsy, but I am not sure if it will make the maintainers' jobs more complicated when pulling updates to bootstrap / Font-Awesome.

@LisaFC
Copy link
Collaborator

LisaFC commented May 11, 2020

Thanks for that, I'll have a look into it - I appreciate the making cloning the theme easier, just need to check it won't cause issues with us maintaining the theme. (we would also need to update all our documentation)

@johnpaulett
Copy link
Contributor Author

@LisaFC Thanks!

I looked at the docsy & docsy-example documentation and I kept debating on if it warranted a change. I think it will be transparent to the end users as the existing --recurse-submodules will still get the submodules, just shallow copies.

I could maybe see 2 related changes:

  • In docsy-example/.gitmodules make themes/docsy be shallow, so when people fork docsy-example, they get this shallow behavior for the docsy submodule itself.
  • Perhaps add a note in Getting Started that after git submodule add you can optionally run git config -f .gitmodules submodule."themes/docsy".shallow true

Happy to do these (or other changes), based upon what you think would be most appropriate.

@deining
Copy link
Collaborator

deining commented Mar 29, 2021

This issue in the repo of the example site addresses this issue, too. Would be great if this issued could be resolved eventually, in whatever way. Once a decision was made, I'm willing to author a PR in order to update the documentation.

@johnpaulett
Copy link
Contributor Author

Happy to rebase (or adjust if there is feedback) this PR.

Avoids each end user needing to pass arguments to git clone / git submodule.

Reduces checkout size from 337M to 239M, and clone --recurse-submodules time
from 56s to 33s on personal laptop.

To do a similar operation without `shallow = true`, the user would have to do:
  git clone --shallow-submodules --recurse-submodules

or:
  git submodule update --init --recursive --depth=1

`shallow = true` added to git 2.10 (Q3 2016)
@johnpaulett
Copy link
Contributor Author

I needed some of the recent changes, so I've rebased onto google:master.

@chalin
Copy link
Collaborator

chalin commented Nov 3, 2021

I've created an issue to track the subtasks associated with this change. See #755.

@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Nov 4, 2021
@LisaFC LisaFC merged commit 1b16760 into google:master Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants