Remix.run Logo
Show HN: Git-lazy-mount mount a repo without cloning it. Works with ordinary Git(github.com)
8 points by mohsen1 6 hours ago | 3 comments

Hello!

This is an attempt to make google3 style repo clones work with Git. In a HN thread a few days ago the idea sparked for me.

It can be super useful for very large repos that need to be cloned for AI coding sessions that might only need a subset of files to accomplish something.

Similar to google3, files appear to be there and can be read and edited but they are only fetched when they are needed.

It works with normal Git commands so there is no need for a new CLI.

On huge catch is, running grep will force fetch all files that grep glob matches. AI coding sessions run the Grep tool quite often. To mitigate this, git-lazy-mount comes with sgrep that offloads grepping to a remote code search engine like SourceGraph.

With this, microVMs that run AI sessions can stay lean and start up much faster.

I am guessing this is probably faster than baking in the git repo in the image but I have not measured performance of it yet. It is definitely useful if the microVM is spun up with unknown repositories (something like Claude on web).

Curious to hear your thoughts and criticism

Thanks!

mohsen1 6 hours ago | parent | next [-]

Link to the discussion that gave me the idea: https://news.ycombinator.com/item?id=48631726#48634278

Imustaskforhelp 6 hours ago | parent | prev [-]

This is interesting and I always like how there are some of us who actually get some ideas from the HN thread and end up building it. Kudos.

A problem that I am interested in is porting large pieces of software from one language to another perhaps with the heavy weight lifting done by LLMs. Do you feel like it can be of use within it and how could I use it within solving this problem, I'd be curious to know.

mohsen1 6 hours ago | parent [-]

Thanks! Two thoughts:

- if this port is happening on a single machine, you are better off with work trees. You can reuse worktrees if creating a new one is expensive. https://github.com/satococoa/git-worktreeinclude can help you initing work trees smooth

- If you want the system scale on the cloud with many many VMs doing work on the repo and repo is large enough that lazy-mount gives you meaningful perf benefits, yes definitely. It can be useful. Note that if the repo is private, you will need to configure sgrep's code search backend to be reachable from the microVMs