Merge branch 'tb/path-filter-fix'
The Bloom filter used for path limited history traversal was broken on systems whose "char" is unsigned; update the implementation and bump the format version to 2. * tb/path-filter-fix: bloom: introduce `deinit_bloom_filters()` commit-graph: reuse existing Bloom filters where possible object.h: fix mis-aligned flag bits table commit-graph: new Bloom filter version that fixes murmur3 commit-graph: unconditionally load Bloom filters bloom: prepare to discard incompatible Bloom filters bloom: annotate filters with hash version repo-settings: introduce commitgraph.changedPathsVersion t4216: test changed path filters with high bit paths t/helper/test-read-graph: implement `bloom-filters` mode bloom.h: make `load_bloom_filter_from_graph()` public t/helper/test-read-graph.c: extract `dump_graph_info()` gitformat-commit-graph: describe version 2 of BDAT commit-graph: ensure Bloom filters are read with consistent settings revision.c: consult Bloom filters for root commits t/t4216-log-bloom.sh: harden `test_bloom_filters_not_used()`
This commit is contained in:
@ -9,6 +9,29 @@ commitGraph.maxNewFilters::
|
||||
commit-graph write` (c.f., linkgit:git-commit-graph[1]).
|
||||
|
||||
commitGraph.readChangedPaths::
|
||||
If true, then git will use the changed-path Bloom filters in the
|
||||
commit-graph file (if it exists, and they are present). Defaults to
|
||||
true. See linkgit:git-commit-graph[1] for more information.
|
||||
Deprecated. Equivalent to commitGraph.changedPathsVersion=-1 if true, and
|
||||
commitGraph.changedPathsVersion=0 if false. (If commitGraph.changedPathVersion
|
||||
is also set, commitGraph.changedPathsVersion takes precedence.)
|
||||
|
||||
commitGraph.changedPathsVersion::
|
||||
Specifies the version of the changed-path Bloom filters that Git will read and
|
||||
write. May be -1, 0, 1, or 2. Note that values greater than 1 may be
|
||||
incompatible with older versions of Git which do not yet understand
|
||||
those versions. Use caution when operating in a mixed-version
|
||||
environment.
|
||||
+
|
||||
Defaults to -1.
|
||||
+
|
||||
If -1, Git will use the version of the changed-path Bloom filters in the
|
||||
repository, defaulting to 1 if there are none.
|
||||
+
|
||||
If 0, Git will not read any Bloom filters, and will write version 1 Bloom
|
||||
filters when instructed to write.
|
||||
+
|
||||
If 1, Git will only read version 1 Bloom filters, and will write version 1
|
||||
Bloom filters.
|
||||
+
|
||||
If 2, Git will only read version 2 Bloom filters, and will write version 2
|
||||
Bloom filters.
|
||||
+
|
||||
See linkgit:git-commit-graph[1] for more information.
|
||||
|
@ -142,13 +142,16 @@ All multi-byte numbers are in network byte order.
|
||||
|
||||
==== Bloom Filter Data (ID: {'B', 'D', 'A', 'T'}) [Optional]
|
||||
* It starts with header consisting of three unsigned 32-bit integers:
|
||||
- Version of the hash algorithm being used. We currently only support
|
||||
value 1 which corresponds to the 32-bit version of the murmur3 hash
|
||||
- Version of the hash algorithm being used. We currently support
|
||||
value 2 which corresponds to the 32-bit version of the murmur3 hash
|
||||
implemented exactly as described in
|
||||
https://en.wikipedia.org/wiki/MurmurHash#Algorithm and the double
|
||||
hashing technique using seed values 0x293ae76f and 0x7e646e2 as
|
||||
described in https://doi.org/10.1007/978-3-540-30494-4_26 "Bloom Filters
|
||||
in Probabilistic Verification"
|
||||
in Probabilistic Verification". Version 1 Bloom filters have a bug that appears
|
||||
when char is signed and the repository has path names that have characters >=
|
||||
0x80; Git supports reading and writing them, but this ability will be removed
|
||||
in a future version of Git.
|
||||
- The number of times a path is hashed and hence the number of bit positions
|
||||
that cumulatively determine whether a file is present in the commit.
|
||||
- The minimum number of bits 'b' per entry in the Bloom filter. If the filter
|
||||
|
Reference in New Issue
Block a user