Skip to content

feat: implement git mirror#32

Merged
alecthomas merged 1 commit intomainfrom
aat/git
Jan 15, 2026
Merged

feat: implement git mirror#32
alecthomas merged 1 commit intomainfrom
aat/git

Conversation

@alecthomas
Copy link
Copy Markdown
Collaborator

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 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
```
@alecthomas alecthomas requested a review from js-murph as a code owner January 15, 2026 09:14
@alecthomas alecthomas merged commit 2a551be into main Jan 15, 2026
5 of 6 checks passed
@alecthomas alecthomas deleted the aat/git branch January 15, 2026 09:26
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