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

Suggest smarter cloning #2547

Merged
merged 1 commit into from
Nov 4, 2024
Merged

Suggest smarter cloning #2547

merged 1 commit into from
Nov 4, 2024

Conversation

MTRNord
Copy link
Collaborator

@MTRNord MTRNord commented Oct 30, 2024

Using --filter=blob:none offers a smaller download size while not having a shallow clone in the end. This should reduce the issue of the size of the repository.

See https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone/ and https://nayak.io/posts/git-clone-optimizations/ for the technical details.

Repo size without:

❯ git count-objects -vH
count: 0
size: 0 Bytes
in-pack: 69431
packs: 2
size-pack: 1.18 GiB
prune-packable: 0
garbage: 0
size-garbage: 0 Bytes

Reposize after:

❯ git count-objects -vH
count: 0
size: 0 Bytes
in-pack: 46580
packs: 2
size-pack: 612.00 MiB
prune-packable: 0
garbage: 0
size-garbage: 0 Bytes

a gc does not help us here as it would be only local.

This does have the tradeoff of slower git blame. But I hope this is not too much of an issue in reality for most contributors.

Using `--filter=blob:none` offers a smaller download size while not having a shallow clone in the end. This should reduce the issue of the size of the repository.
Copy link

Deploying matrix-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0d6db72
Status: ✅  Deploy successful!
Preview URL: https://24e79ff0.matrix-website.pages.dev
Branch Preview URL: https://mtrnord-suggest-smarter-clon.matrix-website.pages.dev

View logs

@MTRNord MTRNord merged commit be481f6 into main Nov 4, 2024
3 checks passed
@MTRNord MTRNord deleted the MTRNord/suggest-smarter-cloning branch November 4, 2024 13:21
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

Successfully merging this pull request may close these issues.

2 participants