diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2019-01-16 10:25:58 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-17 13:44:37 -0800 |
commit | f1f5de442faf85724e67917cd24df6b7275ca360 (patch) | |
tree | bcc60826e270b10c1dd28367c63394caa019b52d /revision.h | |
parent | 5d826e972970a784bd7a7bdf587512510097b8c7 (diff) | |
download | git-f1f5de442faf85724e67917cd24df6b7275ca360.tar.gz |
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>
Diffstat (limited to 'revision.h')
-rw-r--r-- | revision.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/revision.h b/revision.h index 7987bfcd2e..df684701b9 100644 --- a/revision.h +++ b/revision.h @@ -67,6 +67,7 @@ struct rev_cmdline_info { #define REVISION_WALK_NO_WALK_SORTED 1 #define REVISION_WALK_NO_WALK_UNSORTED 2 +struct oidset; struct topo_walk_info; struct rev_info { @@ -327,6 +328,7 @@ void put_revision_mark(const struct rev_info *revs, void mark_parents_uninteresting(struct commit *commit); void mark_tree_uninteresting(struct repository *r, struct tree *tree); +void mark_trees_uninteresting_sparse(struct repository *r, struct oidset *trees); void show_object_with_name(FILE *, struct object *, const char *); |