Re: reducing object store size with remote alternates or shallow clone?

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: reducing object store size with remote alternates or shallow clone?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:22

Kumar Gala [off-list ref] writes:
I'm trying to package a linux kernel source tree and would like to just
tar up a tree with .git/.  However this is a bit problematic as the size
of tgz is about 500M which exceeds the limit of the image I'm trying to
produce.

I was wondering if anyone had a means to reduce the size drastically.
I'm ok if a post processing step is required to get full git support.
One idea I had was doing a shallow clone and if there was some means to
"reconnect" it to a full work state after the fact.
Although your message body does not state your design constraints clearly,
your subject line hints that you are fine with a solution that involves
use of remote alternates by the recipient of your tarball.

I am _guessing_ that you have a fork from some well known tree and want to
sneakernet it to your recipients (iow, they do not "git pull" from your
repository).

How about doing

    $ LINUS=git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
    $ git fetch $LINUS
    $ git bundle create myfork.bundle HEAD..master

and sending the thing over?  The recipient would then do something like:

    $ LINUS=git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
    $ git clone $LINUS linux
    $ cd linux
    $ git pull /tmp/myfork.bundle master

Re: reducing object store size with remote alternates or shallow clone?

From: Brandon Casey <hidden>
Date: 2016-06-15 22:49:22

On 08/24/2010 11:45 AM, Junio C Hamano wrote:
How about doing

    $ LINUS=git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
    $ git fetch $LINUS
    $ git bundle create myfork.bundle HEAD..master
I think you mean

      $ git fetch $LINUS master
      $ git bundle create myfork.bundle FETCH_HEAD..master

-Brandon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help