From: Junio C Hamano <junkio@cox.net>
To: Sergey Vlasov <vsu@altlinux.ru>
Cc: Christian Meder <chris@absolutegiganten.org>, git@vger.kernel.org
Subject: Re: please pull ppc64-2.6.git
Date: Wed, 31 Aug 2005 11:39:20 -0700 [thread overview]
Message-ID: <7vek8aar3b.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: 20050831170852.2f549318.vsu@altlinux.ru
Sergey Vlasov <vsu@altlinux.ru> writes:
> 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).
There has never been a way to publish a partial GIT repository.
I personally am not convinced it is even a good idea for people
to be able to do so.
$GIT_OBJECT_DIRECTORY/info/alternates is a mechanism to solve
completely different issue -- borrowing objects locally from
different object store to save space. This is only a local
'repository organization' issue, just like packing objects or
leaving them unpacked in a repository _should_ not make any
difference to people who are interacting with it.
The use of info/alternates is internal to the git aware server
side, be it git-daemon and git-upload-pack when somebody fetches
from it, or git-receive-pack when somebody pushes into it. The
other end _should_ never have to care if the repository uses
info/alternates, just like it _shouldn't_ matter if the
repository is packed or unpacked. Most importantly, for people
who are interacting with it, the repository has _everything_ it
claims to have by having pointers to head commits under refs/
hierarchy, and is _not_ partial at all.
Yes, you could peek into the remote repository filesystem by
other means, and even slurp the info/alternates file via rsync,
but as stated many times before, a lot of things that rsync
does are by accident not by design.
Some historical explanation may be helpful. info/alternates is
merely an improvement for existing ALTERNATE_OBJECT_DIRECTORIES
mechanism. The latter required individual processes to tell git
what other object stores to consult to find missing objects when
working on a repository whose object store is a partial object
database. This was clearly not per-process information; it was
specific to that partial object store, and that was the reason
info/alternates was invented. The processes do not have to have
that environment variable; instead the necessary information is
recorded in the partial object store itself.
I kept saying '_should_' because commit walkers would not
currently understand alternates, just like they had trouble with
packed repositories earlier. This _is_ a defect, but I
personally feel that this is a problem not worth solving.
Earlier, when commit walkers did not understand packed
repositories, the only workaround was 'then do not pack your
public repository'. This was unacceptable from storage
consumption point of view, and it had to be solved in some way.
Daniel solved it for 0.99.4.
But what info/alternates does is different. If you care about
commit walkers (and I certainly do), there are other means to
save space without using info/alternates; first try packing, and
then hard linking object files with whichever other repository
you would have placed in info/alternates, and you are done.
Now you may argue that being able to publish truly partial
repository that does not have all the objects and depends on
some other repository, very likely to be on completely different
server (otherwise you would not be advocating for a non-local
path such as URL) a worthwhile goal. I personally do not even
believe that a repository relying on a foreign object store is a
good idea, and much less so if you are making that repository
publicly available.
I like your local-mirror-mapping idea very much, but I do not
think it is something that is specific to git. If you have such
a mechanism to map remote URL into local filesystem namespace
and automount/mirror them on demand, I'd like to be able to use
that when I am browsing files in my Emacs (yes, there is
'ange-ftp') or even 'cat' files from it. Its more useful that
way than limiting its use to only when git wants to find missing
object files from its alternate object store.
prev parent reply other threads:[~2005-08-31 18:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <17170.25803.413408.44080@cargo.ozlabs.ibm.com>
2005-08-29 17:32 ` please pull ppc64-2.6.git Linus Torvalds
2005-08-29 17:45 ` Russell King
2005-08-29 18:02 ` Linus Torvalds
2005-08-29 18:20 ` Russell King
2005-09-02 0:20 ` Junio C Hamano
2005-08-29 23:31 ` Paul Mackerras
2005-08-30 0:20 ` Linus Torvalds
2005-08-30 21:40 ` Christian Meder
2005-08-30 22:25 ` Junio C Hamano
2005-08-31 13:08 ` Sergey Vlasov
2005-08-31 18:39 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vek8aar3b.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=chris@absolutegiganten.org \
--cc=git@vger.kernel.org \
--cc=vsu@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).