]> git.ipfire.org Git - thirdparty/git.git/commit - revision.c
revision: add mark_tree_uninteresting_sparse
authorDerrick Stolee <dstolee@microsoft.com>
Wed, 16 Jan 2019 18:25:58 +0000 (10:25 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Jan 2019 21:44:37 +0000 (13:44 -0800)
commitf1f5de442faf85724e67917cd24df6b7275ca360
treebcc60826e270b10c1dd28367c63394caa019b52d
parent5d826e972970a784bd7a7bdf587512510097b8c7
revision: add mark_tree_uninteresting_sparse

In preparation for a new algorithm that walks fewer trees when
creating a pack from a set of revisions, create a method that
takes an oidset of tree oids and marks reachable objects as
UNINTERESTING.

The current implementation uses the existing
mark_tree_uninteresting to recursively walk the trees and blobs.
This will walk the same number of trees as the old mechanism. To
ensure that mark_tree_uninteresting walks the tree, we need to
remove the UNINTERESTING flag before calling the method. This
implementation will be replaced entirely in a later commit.

There is one new assumption in this approach: we are also given
the oids of the interesting trees. This implementation does not
use those trees at the moment, but we will use them in a later
rewrite of this method.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c
revision.h