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

excessive git repo size due to API docs generation keeping history #572

Open
evaleev opened this issue Jan 29, 2025 · 0 comments
Open

excessive git repo size due to API docs generation keeping history #572

evaleev opened this issue Jan 29, 2025 · 0 comments
Assignees

Comments

@evaleev
Copy link
Contributor

evaleev commented Jan 29, 2025

git for-each-ref --format='%(refname)' |
while read branch
do
	size=$(git rev-list --disk-usage --objects HEAD..$branch)
	echo "$size $branch"
done |
sort -n

produces

...
1718504 refs/remotes/origin/bspline
4084920 refs/remotes/origin/mshf_stable
18666808 refs/remotes/origin/tr1
364196113 refs/remotes/origin/gh-pages

as a result fresh checkout takes minutes + repo takes gigabytes unless shallow-cloned (but no developer does it and FetchContent does not support shallow-cloning either) ... this will only continue to get worse.

solution: overwrite the contents of gh-pages branch every time, see https://github.com/TESSEorg/ttg/blob/master/.github/workflows/cmake.yml#L157

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

No branches or pull requests

2 participants