feat: implement git mirror#32
Merged
alecthomas merged 1 commit intomainfrom Jan 15, 2026
Merged
Conversation
This is the first step towards the full Git caching strategy outlined in docs/git-strategy-research.md. Note that it does not yet use cachew's caching infrastructure, it solely relies on a local on-disk git mirror. It already shows very promising results: ``` ~/dev/cachew $ grep -A1 'url.*127.0.0' ~/.gitconfig [url "http://127.0.0.1:8080/git/github.com/"] insteadOf = https://github.com/ ~/dev/cachew $ rm -rf ftl ; time git clone https://github.com/block/ftl.git Cloning into 'ftl'... remote: Enumerating objects: 101725, done. remote: Counting objects: 100% (1367/1367), done. remote: Compressing objects: 100% (595/595), done. remote: Total 101725 (delta 1106), reused 776 (delta 772), pack-reused 100358 (from 4) Receiving objects: 100% (101725/101725), 112.49 MiB | 17.08 MiB/s, done. Resolving deltas: 100% (61431/61431), done. git clone https://github.com/block/ftl.git 3.42s user 0.80s system 48% cpu 8.686 total ~/dev/cachew $ rm -rf ftl ; time git clone https://github.com/block/ftl.git Cloning into 'ftl'... remote: Enumerating objects: 101725, done. remote: Counting objects: 100% (101725/101725), done. remote: Compressing objects: 100% (26203/26203), done. remote: Total 101725 (delta 61478), reused 101451 (delta 61240), pack-reused 0 (from 0) Receiving objects: 100% (101725/101725), 112.36 MiB | 106.24 MiB/s, done. Resolving deltas: 100% (61478/61478), done. git clone https://github.com/block/ftl.git 3.13s user 0.75s system 172% cpu 2.245 total ```
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.
This is the first step towards the full Git caching strategy outlined in docs/git-strategy-research.md. Note that it does not yet use cachew's caching infrastructure, it solely relies on a local on-disk git mirror.
It already shows very promising results: