summaryrefslogtreecommitdiff
path: root/commit-graph.h
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2020-07-01 13:27:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-07-01 21:17:43 (GMT)
commit0087a87ba8fc69b27dde0183ec24ade367a4aa5b (patch)
treee3c93cd6a1a15bd68d3c8c2f2d4712be275ebcf7 /commit-graph.h
parent949197420e3da13c06c6a15fd4b4ed3120753c42 (diff)
downloadgit-0087a87ba8fc69b27dde0183ec24ade367a4aa5b.zip
git-0087a87ba8fc69b27dde0183ec24ade367a4aa5b.tar.gz
git-0087a87ba8fc69b27dde0183ec24ade367a4aa5b.tar.bz2
commit-graph: persist existence of changed-paths
The changed-path Bloom filters were released in v2.27.0, but have a significant drawback. A user can opt-in to writing the changed-path filters using the "--changed-paths" option to "git commit-graph write" but the next write will drop the filters unless that option is specified. This becomes even more important when considering the interaction with gc.writeCommitGraph (on by default) or fetch.writeCommitGraph (part of features.experimental). These config options trigger commit-graph writes that the user did not signal, and hence there is no --changed-paths option available. Allow a user that opts-in to the changed-path filters to persist the property of "my commit-graph has changed-path filters" automatically. A user can drop filters using the --no-changed-paths option. In the process, we need to be extremely careful to match the Bloom filter settings as specified by the commit-graph. This will allow future versions of Git to customize these settings, and the version with this change will persist those settings as commit-graphs are rewritten on top. Use the trace2 API to signal the settings used during the write, and check that output in a test after manually adjusting the correct bytes in the commit-graph file. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.h')
-rw-r--r--commit-graph.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/commit-graph.h b/commit-graph.h
index f0fb13e..45b1e5b 100644
--- a/commit-graph.h
+++ b/commit-graph.h
@@ -96,6 +96,7 @@ enum commit_graph_write_flags {
/* Make sure that each OID in the input is a valid commit OID. */
COMMIT_GRAPH_WRITE_CHECK_OIDS = (1 << 3),
COMMIT_GRAPH_WRITE_BLOOM_FILTERS = (1 << 4),
+ COMMIT_GRAPH_NO_WRITE_BLOOM_FILTERS = (1 << 5),
};
struct split_commit_graph_opts {