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

Move to a git based fetch/update client #109

Open
agnivade opened this issue Oct 7, 2016 · 0 comments
Open

Move to a git based fetch/update client #109

agnivade opened this issue Oct 7, 2016 · 0 comments

Comments

@agnivade
Copy link
Member

agnivade commented Oct 7, 2016

This gives us benefits already mentioned here - #9 (comment)

Citing them again for easy lookup-

Speed: Incremental changes

We get incremental changes pulled in: a fetch can download as many revisions as required, 1 being what's considered a shallow clone. Alternatively --depth is provided at the git clone (and thus git fetch as well) level to specify the amount of revisions to be fetched for the initial setup.

Note: running git fetch --depth 1 https://github.com/tldr-pages/tldr master:master only downloads 205.17 KiB on a clean git init . repository. Fetching in the last merged change (from tldr-pages/tldr@35b685f to tldr-pages/tldr@093bb6f) means fetching in 2 compressed commits. I've measured using this script and the output is below:

repos/tldr λ ./size.sh 093bb6f..35b685f
3       package.json
total 3

3 mere uncompressed bytes. Now throw in Packfile compression.

Speed: Smart Protocol

If the user setups ssh access, we get the benefits of using the "start" protocol: https://git-scm.com/book/en/v2/Git-Internals-Transfer-Protocols#The-Smart-Protocol

Speed: Compression

The content comes stored in compressed form by default: https://git-scm.com/book/en/v2/Git-Internals-Packfiles

Integrity

Not only content is SHA-1 verified upon transfers (https://git-scm.com/book/en/v2/Git-Internals-Git-Objects) but can be further verified very cheaply at any point in time to ensure consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant