Merge branch 'jk/left-right-bitmap'
When called with '--left-right' and '--use-bitmap-index', 'rev-list' will produce output without any left/right markers, which has been corrected. * jk/left-right-bitmap: rev-list: skip bitmap traversal for --left-right
This commit is contained in:
@ -485,6 +485,13 @@ static int try_bitmap_traversal(struct rev_info *revs,
|
||||
if (revs->max_count >= 0)
|
||||
return -1;
|
||||
|
||||
/*
|
||||
* We can't know which commits were left/right in a single traversal,
|
||||
* and we don't yet know how to traverse them separately.
|
||||
*/
|
||||
if (revs->left_right)
|
||||
return -1;
|
||||
|
||||
bitmap_git = prepare_bitmap_walk(revs, filter_provided_objects);
|
||||
if (!bitmap_git)
|
||||
return -1;
|
||||
|
@ -503,6 +503,18 @@ test_expect_success 'boundary-based traversal is used when requested' '
|
||||
done
|
||||
'
|
||||
|
||||
test_expect_success 'left-right not confused by bitmap index' '
|
||||
git rev-list --left-right other...HEAD >expect &&
|
||||
git rev-list --use-bitmap-index --left-right other...HEAD >actual &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
test_expect_success 'left-right count not confused by bitmap-index' '
|
||||
git rev-list --left-right --count other...HEAD >expect &&
|
||||
git rev-list --use-bitmap-index --left-right --count other...HEAD >actual &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
test_bitmap_cases "pack.writeBitmapLookupTable"
|
||||
|
||||
test_expect_success 'verify writing bitmap lookup table when enabled' '
|
||||
|
Reference in New Issue
Block a user