From: Song Liu <songliubrav...@fb.com>
Date: Tue, 8 May 2018 17:46:23 +0000

> We are seeing the following error on multiple different systems while 
> cloning net-next tree. 
> 
>   $ git clone 
> https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
>   Cloning into 'net-next'...

Regardless of the failure, it is so _insanely_ wasteful to clone my
trees like this.

Just simply always have Linus's tree always checked out somewhere:

        git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

Let's say you have it under src/GIT/linux as I do.

Then go to src/GIT and say:

        git clone --reference linux/.git 
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git

This way it only downloads the objects that are unique to the net-next
tree.  Similarly for 'net':

        git clone --reference linux/.git 
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git

Or any other subsystem tree.

Periodically "git pull --ff-only" your Linus's tree, and you'll be
much happier in GIT land :-)

As subsystem changes make their way into Linus's GIT tree, git will
notice over time and garbage collect the dups that are in your
subsystem GIT trees.

Reply via email to