diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-05-01 13:39:53 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-05-01 13:39:53 -0700 |
| commit | 9b6606f43d55bbf33b9924d16e02e60e1c09660a (patch) | |
| tree | 0082094df8d1e99873fa1e72628fa4e02ec3a282 /tree-diff.c | |
| parent | Merge branch 'tb/commit-graph-fd-exhaustion-fix' (diff) | |
| parent | bloom: ignore renames when computing changed paths (diff) | |
| download | git-9b6606f43d55bbf33b9924d16e02e60e1c09660a.tar.gz git-9b6606f43d55bbf33b9924d16e02e60e1c09660a.zip | |
Merge branch 'gs/commit-graph-path-filter'
Introduce an extension to the commit-graph to make it efficient to
check for the paths that were modified at each commit using Bloom
filters.
* gs/commit-graph-path-filter:
bloom: ignore renames when computing changed paths
commit-graph: add GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS test flag
t4216: add end to end tests for git log with Bloom filters
revision.c: add trace2 stats around Bloom filter usage
revision.c: use Bloom filters to speed up path based revision walks
commit-graph: add --changed-paths option to write subcommand
commit-graph: reuse existing Bloom filters during write
commit-graph: write Bloom filters to commit graph file
commit-graph: examine commits by generation number
commit-graph: examine changed-path objects in pack order
commit-graph: compute Bloom filters for changed paths
diff: halt tree-diff early after max_changes
bloom.c: core Bloom filter implementation for changed paths.
bloom.c: introduce core Bloom filter constructs
bloom.c: add the murmur3 hash implementation
commit-graph: define and use MAX_NUM_CHUNKS
Diffstat (limited to 'tree-diff.c')
| -rw-r--r-- | tree-diff.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tree-diff.c b/tree-diff.c index 33ded7f8b3..f3d303c6e5 100644 --- a/tree-diff.c +++ b/tree-diff.c @@ -434,6 +434,9 @@ static struct combine_diff_path *ll_diff_tree_paths( if (diff_can_quit_early(opt)) break; + if (opt->max_changes && opt->num_changes > opt->max_changes) + break; + if (opt->pathspec.nr) { skip_uninteresting(&t, base, opt); for (i = 0; i < nparent; i++) @@ -518,6 +521,7 @@ static struct combine_diff_path *ll_diff_tree_paths( /* t↓ */ update_tree_entry(&t); + opt->num_changes++; } /* t > p[imin] */ @@ -535,6 +539,7 @@ static struct combine_diff_path *ll_diff_tree_paths( skip_emit_tp: /* ∀ pi=p[imin] pi↓ */ update_tp_entries(tp, nparent); + opt->num_changes++; } } @@ -552,6 +557,7 @@ struct combine_diff_path *diff_tree_paths( const struct object_id **parents_oid, int nparent, struct strbuf *base, struct diff_options *opt) { + opt->num_changes = 0; p = ll_diff_tree_paths(p, oid, parents_oid, nparent, base, opt); /* |
