diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-11-08 12:56:28 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-11-08 12:56:28 +0900 |
| commit | 02a2d5706de557af1f1b05ede3ec3fe340a4189b (patch) | |
| tree | a29cc6c0826eac6b849e3d6971504e756590d036 | |
| parent | 1ee7dbde67dac49f50deeb1abd743d6e0fd59e98 (diff) | |
| parent | 16a186fedeb77f31213184b760f8da17140ddb92 (diff) | |
| download | git-02a2d5706de557af1f1b05ede3ec3fe340a4189b.tar.xz | |
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
| -rw-r--r-- | builtin/rev-list.c | 7 | ||||
| -rwxr-xr-x | t/t5310-pack-bitmaps.sh | 12 |
2 files changed, 19 insertions, 0 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c index f62bcbf2b1..3078787115 100644 --- a/builtin/rev-list.c +++ b/builtin/rev-list.c @@ -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; diff --git a/t/t5310-pack-bitmaps.sh b/t/t5310-pack-bitmaps.sh index 7044c7d7c6..6bcbea64cc 100755 --- a/t/t5310-pack-bitmaps.sh +++ b/t/t5310-pack-bitmaps.sh @@ -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' ' |
