# Is there such a thing as a git:// proxy?

2 messages from 2006-06-18 to 2006-06-18. Participants: linux@horizon.com, Linus Torvalds.
Thread: https://gitlist.dev/t/4559

## linux@horizon.com, 2006-06-18 12:42

Subject: Is there such a thing as a git:// proxy?
Message-ID: <20060618124250.15471.qmail@science.horizon.com>
URL: https://gitlist.dev/e/20060618124250.15471.qmail%40science.horizon.com

```
I have several machines tracking kernel.org, and I've been moving away
from downloading patch files periodically (cached very nicely by squid)
to just doing "git pull".

But it seems silly to be sucking four copies of the same data from
kernel.org.

Now, one obvious solution is to have one master copy track kernel.org
and have all the other local machines track that.  But then I have to
manually pull the local master every time.

Has anyone put together something that can automatically check
upstream for updates when someone fetches from it?

Ultimately desirable features would, I suppose include:
- Pulling over ssh as well (using auth agent forwarding to pull
  from upstream)
- Support for arbitrary projects (so the cache server can handle
  "git clone" requests), if I develop a desire to pull an -mm or
  -libata-dev or whatever kernel, it will also work.
- Using a single shared object pool for the above.
- Cache cleanup if a project hasn't been used in long enough.
  (You'd probably just time out the heads and let git-prune get
  rid of the objects.)
- Recycling the pack from the upstream server rather than regenerating it.
- Progress reporting on the upstream fetch (since the point is that
  the upstream server pipe is narrower).
- Transparent proxy support

... but I'll settle for the simple solution to start.  Perhaps it could
be as simple as a pre-upload hook invoked by git-upload-pack?

This hasn't gotten itchy enough for me to start scratching it myself,
but I figured I'd mention it and see if anyone was interested.

```

## Linus Torvalds, 2006-06-18 17:02

Subject: Re: Is there such a thing as a git:// proxy?
Message-ID: <Pine.LNX.4.64.0606180953510.5498@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0606180953510.5498%40g5.osdl.org
In-Reply-To: <20060618124250.15471.qmail@science.horizon.com>

```


On Sun, 18 Jun 2006, linux@horizon.com wrote:
> 
> Has anyone put together something that can automatically check
> upstream for updates when someone fetches from it?

Well, there's actually a much easier solution: just add a "pre-pull" hook 
to "git-send-objects", and then have that hook check the real remote.

Does anybody see any problems with that?

		Linus

```
