Web lists-archives.com

Re: Is it possible to git clone --filter= without any objects?




Jonathan Tan <jonathantanmy@xxxxxxxxxx> writes:

> By "without any objects" in your email subject, do you mean "without
> blob and tree objects"? If yes, there is some code in the
> md/filter-trees branch that can do that with a "--filter=tree:0"
> option.

I too was wondering what the "without any objects" thing meant
myself.

What would it take on top of the following sequence to create such
an ultra-lazy clone?

	$ mkdir very-sparse && cd very-sparse
	$ git init
	$ git remote add origin $URL

At this point, the repository does not have any object, but it
already knows whom to talk to to get the objects in the project.
The remote must be configured so that it is willing to feed you any
object you name, but would it be just some "git config" magic after
the above three steps to make it as if it was prepared with "git
clone --filter="?  If so, what does that magic look like?

Thanks.