summaryrefslogtreecommitdiff
path: root/commit-slab-impl.h
diff options
context:
space:
mode:
authorLibravatar Taylor Blau <me@ttaylorr.com>2020-07-01 13:27:29 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-07-01 14:17:43 -0700
commitf3c2a36810d5322747ad573f7e2b8404d4f67ead (patch)
tree26f5c4be224f280814b0c52b79634a5282d1cc09 /commit-slab-impl.h
parentrevision.c: fix whitespace (diff)
downloadtgif-f3c2a36810d5322747ad573f7e2b8404d4f67ead.tar.xz
revision: empty pathspecs should not use Bloom filters
The prepare_to_use_bloom_filter() method was not intended to be called on an empty pathspec. However, 'git log -- .' and 'git log' are subtly different: the latter reports all commits while the former will simplify commits that do not change the root tree. This means that the path used to construct the bloom_key might be empty, and that value is not added to the Bloom filter during construction. That means that the results are likely incorrect! To resolve the issue, be careful about the length of the path and stop filling Bloom filters. To be completely sure we do not use them, drop the pointer to the bloom_filter_settings from the commit-graph. That allows our test to look at the trace2 logs to verify no Bloom filter statistics are reported. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-slab-impl.h')
0 files changed, 0 insertions, 0 deletions