diff options
author | Jeff King <peff@peff.net> | 2017-03-09 16:29:49 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-10 22:51:30 +0300 |
commit | a91aca44bf4b3746c3ce03583a1b3418d1610ef7 (patch) | |
tree | eb9db8984d71e3213e169110d3dd09528642eb5d /git-merge-resolve.sh | |
parent | d344d1cb8a1d1bea268ec78f5d7315381a0a6c96 (diff) |
ref-filter: use separate cache for contains_tag_algo
The algorithm which powers "tag --contains" uses the
TMP_MARK and UNINTERESTING bits, but never cleans up after
itself. As a result, stale UNINTERESTING bits may impact
later traversals (like "--merged").
We could fix this by clearing the bits after we're done with
the --contains traversal. That would be enough to fix the
existing problem, but it leaves future developers in a bad
spot: they cannot add other traversals that operate
simultaneously with --contains (e.g., if you wanted to add
"--no-contains" and use both filters at the same time).
Instead, we can use a commit slab to store our cached
results, which will store the bits outside of the commit
structs entirely. This adds an extra level of indirection,
but in my tests (running "git tag --contains HEAD" on
linux.git), there was no measurable slowdown.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-merge-resolve.sh')
0 files changed, 0 insertions, 0 deletions