]> source.dussan.org Git - jgit.git/commit
Preliminary support for tree:<depth> filter 92/138992/26
authorMatthew DeVore <matvore@gmail.com>
Mon, 18 Mar 2019 14:15:52 +0000 (07:15 -0700)
committerMatthew DeVore <matvore@gmail.com>
Tue, 16 Apr 2019 17:36:55 +0000 (10:36 -0700)
commit93dd2d482abb6202e265226775a4bdd2b64d4209
treefba024b05adbf0c9cbfd9a3e6270e87b570c1f00
parent5a0f63106349c6c45e732d021a48ac1c5e9c9d21
Preliminary support for tree:<depth> filter

This is used when fetching, and in particular to populate a partial
clone or a virtual file system cache as the user navigates. With this,
a client can pre-fetch a few directories deeper than only the current
directory.

depth:0 will omit all trees, and is useful if you only want to fetch
the commits of a repository, or fetch just a single tree or blob object.
depth:1 will fetch only the root tree of all commits fetched. depth:2
will fetch the root tree and all blobs and tree objects directly
referenced from it. depth:3 gets one more level, and so on. depth:#
will not filter a blob or tree that is explicitly marked wanted.

Bitmaps are disabled when this filter is used.

This implementation is quite slow because it iterates over all omitted
objects rather than skipping them. This will be addressed in follow-up
commits.

Change-Id: Ic312fee22d60e32cfcad59da56980e90ae2cae6a
Signed-off-by: Matthew DeVore <matvore@gmail.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV0ParserTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV2ParserTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/FilterSpec.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java