[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180509070955.mkgo3mitxjt3q6jt@unicorn.suse.cz>
Date: Wed, 9 May 2018 09:09:55 +0200
From: Michal Kubecek <mkubecek@...e.cz>
To: netdev@...r.kernel.org
Cc: David Miller <davem@...emloft.net>, songliubraving@...com,
ast@...com, konstantin@...uxfoundation.org
Subject: Re: Failed to clone net-next.git
On Tue, May 08, 2018 at 08:04:42PM -0400, David Miller wrote:
> From: Song Liu <songliubraving@...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.
With reasonably recent git (>= 2.5), another option worth considering is
using worktrees:
cd /src/GIT/linux
git remote add --no-tags net-next git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
git branch --track net-next net-next/master
git worktree add ../net-next net-next
It works well for me, the only limitation to keep in mind is that you
cannot have the same branch checked out in two different worktrees at
the same time.
Michal Kubecek
Powered by blists - more mailing lists