Document why the repository is large and how to shrink a clone - #1078
Merged
Conversation
A full clone uses around 500 MB of disk space, which is surprising for a documentation site whose source tree is a few MB. The cause is not obvious from the working tree: the deploy workflow pushes the complete rendered site to gh-pages on every build, and 391515 of the 399118 objects in the pack belong to that branch alone. The two Docusaurus search indexes are the largest part, roughly 270 MB across 1582 stored versions, because they are minified JSON with regenerated term IDs and therefore do not delta-compress between builds. Nobody working on the site needs gh-pages locally, so the README now describes both ways to avoid it: dropping the remote-tracking ref and repacking an existing clone, or cloning with --single-branch in the first place. Either one leaves the clone at around 20 MB, measured with a --single-branch clone of main. The negative refspec that keeps git fetch from restoring the branch needs Git 2.29 or newer, and the section says so, along with how to undo it. It also states that this is local only, so that nobody reads the instructions as a change that would break GitHub Pages. Assisted-by: Claude:claude-opus-5[1m] Signed-off-by: Christian Berendt <berendt@osism.tech>
✅
|
| Descriptor | Linter | Files | Fixed | Errors | Max errors | Warnings | Elapsed time |
|---|---|---|---|---|---|---|---|
| ✅ ACTION | actionlint | 5 | 0 | 0 | 0.04s | ||
| ✅ JSON | jsonlint | 4 | 0 | 0 | 0.08s | ||
| ✅ JSON | prettier | 4 | 0 | 0 | 0.26s | ||
| ✅ JSON | v8r | 4 | 0 | 0 | 8.19s | ||
| ✅ MARKDOWN | markdownlint | 169 | 0 | 0 | 1.54s | ||
| ✅ MARKDOWN | markdown-table-formatter | 169 | 0 | 0 | 0.22s | ||
| ✅ REPOSITORY | betterleaks | yes | no | no | 0.49s | ||
| ✅ REPOSITORY | checkov | yes | no | no | 18.77s | ||
| ✅ REPOSITORY | git_diff | yes | no | no | 0.04s | ||
| ✅ REPOSITORY | secretlint | yes | no | no | 2.36s | ||
| ✅ REPOSITORY | trufflehog | yes | no | no | 3.35s | ||
| ✅ SPELL | codespell | 179 | 0 | 0 | 0.4s | ||
| lychee | 179 | 1 | 0 | 37.9s | |||
| ✅ YAML | prettier | 6 | 0 | 0 | 0.25s | ||
| ✅ YAML | v8r | 6 | 0 | 0 | 5.31s | ||
| ✅ YAML | yamllint | 6 | 0 | 0 | 0.69s |
Detailed Issues
⚠️ SPELL / lychee - 1 error
📝 Summary
---------------------
🔍 Total.........1082
🔗 Unique.........823
✅ Successful....1007
⏳ Timeouts.........3
🔀 Redirected.......5
👻 Excluded........71
❓ Unknown..........0
🚫 Errors...........1
⛔ Unsupported......1
Errors in docs/guides/deploy-guide/services/openstack.md
[TIMEOUT] https://www.openstack.org/software/project-navigator/openstack-components#openstack-services (at 14:5) | Request timed out
Errors in docs/release-notes/osism-10.md
[ERROR] https://gateway-api.sigs.k8s.io/ (at 842:3) | Connection failed. Check network connectivity and firewall settings
Errors in docs/release-notes/osism-7.md
[TIMEOUT] https://www.openstack.org/software/openstack-bobcat (at 978:38) | Request timed out
Errors in docs/release-notes/osism-8.md
[TIMEOUT] https://www.openstack.org/software/openstack-caracal (at 223:38) | Request timed out
Hint: Followed 5 redirects. You might want to consider replacing redirecting URLs with the resolved URLs. Use verbose mode (`-v`/`-vv`) to see redirection details.
See detailed reports in MegaLinter artifacts
Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)
- Documentation: Custom Flavors
- Command:
npx mega-linter-runner@10.0.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,JSON_JSONLINT,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_BETTERLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,SPELL_CODESPELL,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

Show us your support by starring ⭐ the repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A full clone of this repository uses around 500 MB of disk space, which is surprising for a documentation site whose source tree is a few MB. Nothing in the working tree explains it, so this adds a
Repository Sizesection to the README that does.The cause is the
gh-pagesbranch. The deploy workflow pushes the complete rendered site there on every build, and 391515 of the 399118 objects in the pack belong to that branch alone, 98% of the repository. The two Docusaurus search indexes account for roughly 270 MB across 1582 stored versions: they are minified JSON with regenerated term IDs, so nearly the whole file changes per build and Git cannot store the versions as small deltas. The rendered HTML underdocs/andde/docs/adds another 145 MB.Nobody working on the site needs
gh-pageslocally, so the section gives both ways to avoid it, either dropping the remote-tracking ref and repacking an existing clone, or cloning with--single-branchfrom the start. Both leave the clone at around 20 MB, measured with a--single-branchclone ofmain.The negative refspec that keeps
git fetchfrom restoring the branch needs Git 2.29 or newer, and the section says so along with how to undo it. It also states that this is local only, so that nobody reads the instructions as a change that would break GitHub Pages.README only, no site content and no workflow is touched.