summaryrefslogtreecommitdiff
path: root/t/t6132-pathspec-exclude.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-02-14 18:22:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-14 18:46:22 (GMT)
commitd90fe06ea7dd15bdbd555ad2f4bfdd069032b697 (patch)
tree9ebacb9b86f901b93c81ed5a7d0673fc94a0a026 /t/t6132-pathspec-exclude.sh
parente03f928e2ab92e47467d48520a73a19582dff286 (diff)
downloadgit-d90fe06ea7dd15bdbd555ad2f4bfdd069032b697.zip
git-d90fe06ea7dd15bdbd555ad2f4bfdd069032b697.tar.gz
git-d90fe06ea7dd15bdbd555ad2f4bfdd069032b697.tar.bz2
pack-bitmap: refuse to do a bitmap traversal with pathspecs
rev-list has refused to use bitmaps with pathspec limiting since c8a70d3509 (rev-list: disable --use-bitmap-index when pruning commits, 2015-07-01). But this is true not just for rev-list, but for anyone who calls prepare_bitmap_walk(); the code isn't equipped to handle this case. We never noticed because the only other callers would never pass a pathspec limiter. But let's push the check down into prepare_bitmap_walk() anyway. That's a more logical place for it to live, as callers shouldn't need to know the details (and must be prepared to fall back to a regular traversal anyway, since there might not be bitmaps in the repository). It would also prepare us for a day where this case _is_ handled, but that's pretty unlikely. E.g., we could use bitmaps to generate the set of commits, and then diff each commit to see if it matches the pathspec. That would be slightly faster than a naive traversal that actually walks the commits. But you'd probably do better still to make use of the newer commit-graph feature to make walking the commits very cheap. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6132-pathspec-exclude.sh')
0 files changed, 0 insertions, 0 deletions