Merge branch 'ps/pack-bitmap-optim'
Optimize "rev-list --use-bitmap-index --objects" corner case that uses negative tags as the stopping points. * ps/pack-bitmap-optim: pack-bitmap: avoid traversal of objects referenced by uninteresting tag
This commit is contained in:
@ -997,6 +997,7 @@ struct bitmap_index *prepare_bitmap_walk(struct rev_info *revs,
|
|||||||
object_list_insert(object, &wants);
|
object_list_insert(object, &wants);
|
||||||
|
|
||||||
object = parse_object_or_die(get_tagged_oid(tag), NULL);
|
object = parse_object_or_die(get_tagged_oid(tag), NULL);
|
||||||
|
object->flags |= (tag->object.flags & UNINTERESTING);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (object->flags & UNINTERESTING)
|
if (object->flags & UNINTERESTING)
|
||||||
|
@ -15,6 +15,12 @@ test_expect_success 'setup bitmap config' '
|
|||||||
git config pack.writebitmaps true
|
git config pack.writebitmaps true
|
||||||
'
|
'
|
||||||
|
|
||||||
|
# we need to create the tag up front such that it is covered by the repack and
|
||||||
|
# thus by generated bitmaps.
|
||||||
|
test_expect_success 'create tags' '
|
||||||
|
git tag --message="tag pointing to HEAD" perf-tag HEAD
|
||||||
|
'
|
||||||
|
|
||||||
test_perf 'repack to disk' '
|
test_perf 'repack to disk' '
|
||||||
git repack -ad
|
git repack -ad
|
||||||
'
|
'
|
||||||
@ -43,6 +49,14 @@ test_perf 'rev-list (objects)' '
|
|||||||
git rev-list --all --use-bitmap-index --objects >/dev/null
|
git rev-list --all --use-bitmap-index --objects >/dev/null
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_perf 'rev-list with tag negated via --not --all (objects)' '
|
||||||
|
git rev-list perf-tag --not --all --use-bitmap-index --objects >/dev/null
|
||||||
|
'
|
||||||
|
|
||||||
|
test_perf 'rev-list with negative tag (objects)' '
|
||||||
|
git rev-list HEAD --not perf-tag --use-bitmap-index --objects >/dev/null
|
||||||
|
'
|
||||||
|
|
||||||
test_perf 'rev-list count with blob:none' '
|
test_perf 'rev-list count with blob:none' '
|
||||||
git rev-list --use-bitmap-index --count --objects --all \
|
git rev-list --use-bitmap-index --count --objects --all \
|
||||||
--filter=blob:none >/dev/null
|
--filter=blob:none >/dev/null
|
||||||
|
Reference in New Issue
Block a user