On Tue, 30 Aug 2005 15:25:22 -0700 Junio C Hamano wrote:

> Christian Meder <[EMAIL PROTECTED]> writes:
> > Is alternates unthinkable with URLs (e.g. remote alternates).
> In order to read an object data, the low level core GIT layer
> does open()/mmap() of a file on the locally mounted filesystem.
> It also does opendir()/readdir()/closedir() to find what's
> available.
> If you can arrange to automount via luserfs (or whatever; we do
> not care much about particular implementation) so that it can do
> these filesystem operations, git will happily use it.
> Even in that case, the alternate you would tell git should look
> like a local filesystem path --- your automounting from remote
> specified with URL for such a path would happen outside GIT.

All this means that currently there is no clean way to publish a partial
GIT repository, unless you place it at the same server where the base
repository is located (and even in that case needing to use something
like "echo /pub/scm/linux/kernel/git/torvalds/linux-2.6/objects >
objects/info/alternates" looks like a horrible hack).

What if we create a mapping layer from URLs to local mirrors of
corresponding repositories?  Store this mapping, e.g., in
~/.git-core/mirrors, then if git reads an URL instead of an absolute
local path from objects/info/alternates, it will consult that file and
either use the specified local mirror, or complain that a local copy of
the base repository is not available.  The partial repository will then
contain no system-specific paths and could be published without

Attachment: pgpgbKks1DKX5.pgp
Description: PGP signature

Reply via email to