On Sun, Jul 10, 2005 at 12:15:48AM -0700, Junio C Hamano wrote:
As a workaround until Cogito gets updated, would it help to have
the environment variable GIT_ALTERNATE_OBJECT_DIRECTORIES
pointing at the untouched copy of Linus tree's .git/objects/
directory? All your other trees would find the objects in your
copied-Linus tree (including packed one) available to them
already and hopefully pull breakage does not even have to touch
those objects.
That seems to work, thanks. I think this is a good idea anyway -
it seems to mean that each working tree ends up with an empty set of
.git/objects/* directories. When new work is done in a tree, the
corresponding objects then appear, and only these objects need
transferring upstream.
It means that rsync --delete-after can (in theory) be used when
making changes available to the upstream maintainer.
--
Russell King
On Sun, 10 Jul 2005, Russell King wrote:
It means that rsync --delete-after can (in theory) be used when
making changes available to the upstream maintainer.
I'd suggest against that from a safety standpoint (no backups), but what
you _can_ do is to upload only the objects I don't have.
This actually works - I already synced several weeks ago with Paul
Mackerras, who had made his ppc64 git thing contain only the objects that
I didn't have.
In other words, if you have my tree pointed to by
GIT_ALTERNATE_OBJECT_DIRECTORIES, and you populate your tree only with new
files, you can actually upload that small "sparsely populated" tree as-is
(without any of the objects that came from my tree), and I should be able
to pull it as-is.
Well, at least with rsync. I think my git "pack" send/receive thing might
be unhappy about a partial tree, but that's something I can fix, so if
this makes it easier for people (you can create a totally new tre _really_
cheaply and also upload it and move it around very cheaply), then I'm ok
with pulling from partial repositories, and I have indeed already done so
in the past.
Btw, if people start doing this, then I really think we want a
".git/config" file, so that you can have different alternate object
directories for different git directories without having to remember to
set the environment variables all the time.
Linus