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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

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

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.

1 participant