Add logic to a) parse Bloom filter information from the commit graph file and, b) re-use existing Bloom filters. See Documentation/technical/commit-graph-format for the format in which the Bloom filter information is written to the commit graph file. To read Bloom filter for a given commit with lexicographic position 'i' we need to: 1. Read BIDX[i] which essentially gives us the starting index in BDAT for filter of commit i+1. It is essentially the index past the end of the filter of commit i. It is called end_index in the code. 2. For i>0, read BIDX[i-1] which will give us the starting index in BDAT for filter of commit i. It is called the start_index in the code. For the first commit, where i = 0, Bloom filter data starts at the beginning, just past the header in the BDAT chunk. Hence, start_index will be 0. 3. The length of the filter will be end_index - start_index, because BIDX[i] gives the cumulative 8-byte words including the ith commit's filter. We toggle whether Bloom filters should be recomputed based on the compute_if_not_present flag. Helped-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Garima Singh <garima.singh@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| test-advise.c | ||
| test-bloom.c | ||
| test-chmtime.c | ||
| test-config.c | ||
| test-ctype.c | ||
| test-date.c | ||
| test-delta.c | ||
| test-dir-iterator.c | ||
| test-drop-caches.c | ||
| test-dump-cache-tree.c | ||
| test-dump-fsmonitor.c | ||
| test-dump-split-index.c | ||
| test-dump-untracked-cache.c | ||
| test-example-decorate.c | ||
| test-fake-ssh.c | ||
| test-genrandom.c | ||
| test-genzeros.c | ||
| test-hash-speed.c | ||
| test-hash.c | ||
| test-hashmap.c | ||
| test-index-version.c | ||
| test-json-writer.c | ||
| test-lazy-init-name-hash.c | ||
| test-line-buffer.c | ||
| test-match-trees.c | ||
| test-mergesort.c | ||
| test-mktemp.c | ||
| test-oidmap.c | ||
| test-online-cpus.c | ||
| test-parse-options.c | ||
| test-parse-pathspec-file.c | ||
| test-path-utils.c | ||
| test-pkt-line.c | ||
| test-prio-queue.c | ||
| test-progress.c | ||
| test-reach.c | ||
| test-read-cache.c | ||
| test-read-graph.c | ||
| test-read-midx.c | ||
| test-ref-store.c | ||
| test-regex.c | ||
| test-repository.c | ||
| test-revision-walking.c | ||
| test-run-command.c | ||
| test-scrap-cache-tree.c | ||
| test-serve-v2.c | ||
| test-sha1-array.c | ||
| test-sha1.c | ||
| test-sha1.sh | ||
| test-sha256.c | ||
| test-sigchain.c | ||
| test-strcmp-offset.c | ||
| test-string-list.c | ||
| test-submodule-config.c | ||
| test-submodule-nested-repo-config.c | ||
| test-subprocess.c | ||
| test-svn-fe.c | ||
| test-tool.c | ||
| test-tool.h | ||
| test-trace2.c | ||
| test-urlmatch-normalization.c | ||
| test-wildmatch.c | ||
| test-windows-named-pipe.c | ||
| test-write-cache.c | ||
| test-xml-encode.c | ||