diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-11-08 09:04:42 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-11-08 09:04:42 +0300 |
commit | 8ed4eb753881cf3a695cbe531c22698ca222ff0f (patch) | |
tree | 28e7f24a60f6b4a854026b8fd1bfeb9387b2e250 /t | |
parent | c732f7430da8d4dedccd05540eae3dc7421dcdc6 (diff) | |
parent | 7b3c8e9f388c8ef56f17d2cb633c0a579730a563 (diff) |
Merge branch 'tb/rev-list-unpacked-fix'
"git rev-list --unpacked --objects" failed to exclude packed
non-commit objects, which has been corrected.
* tb/rev-list-unpacked-fix:
pack-bitmap: drop --unpacked non-commit objects from results
list-objects: drop --unpacked non-commit objects from results
Diffstat (limited to 't')
-rwxr-xr-x | t/t6000-rev-list-misc.sh | 13 | ||||
-rwxr-xr-x | t/t6113-rev-list-bitmap-filters.sh | 13 | ||||
-rwxr-xr-x | t/t6115-rev-list-du.sh | 7 |
3 files changed, 33 insertions, 0 deletions
diff --git a/t/t6000-rev-list-misc.sh b/t/t6000-rev-list-misc.sh index 12def7bcbf..6289a2e8b0 100755 --- a/t/t6000-rev-list-misc.sh +++ b/t/t6000-rev-list-misc.sh @@ -169,4 +169,17 @@ test_expect_success 'rev-list --count --objects' ' test_line_count = $count actual ' +test_expect_success 'rev-list --unpacked' ' + git repack -ad && + test_commit unpacked && + + git rev-list --objects --no-object-names unpacked^.. >expect.raw && + sort expect.raw >expect && + + git rev-list --all --objects --unpacked --no-object-names >actual.raw && + sort actual.raw >actual && + + test_cmp expect actual +' + test_done diff --git a/t/t6113-rev-list-bitmap-filters.sh b/t/t6113-rev-list-bitmap-filters.sh index 4d8e09167e..86c70521f1 100755 --- a/t/t6113-rev-list-bitmap-filters.sh +++ b/t/t6113-rev-list-bitmap-filters.sh @@ -141,4 +141,17 @@ test_expect_success 'combine filter with --filter-provided-objects' ' done <objects ' +test_expect_success 'bitmap traversal with --unpacked' ' + git repack -adb && + test_commit unpacked && + + git rev-list --objects --no-object-names unpacked^.. >expect.raw && + sort expect.raw >expect && + + git rev-list --use-bitmap-index --objects --all --unpacked >actual.raw && + sort actual.raw >actual && + + test_cmp expect actual +' + test_done diff --git a/t/t6115-rev-list-du.sh b/t/t6115-rev-list-du.sh index d59111dede..c0cfda62fa 100755 --- a/t/t6115-rev-list-du.sh +++ b/t/t6115-rev-list-du.sh @@ -48,6 +48,13 @@ check_du HEAD check_du --objects HEAD check_du --objects HEAD^..HEAD +test_expect_success 'setup for --unpacked tests' ' + git repack -adb && + test_commit unpacked +' + +check_du --all --objects --unpacked + # As mentioned above, don't use hardcode sizes as actual size, but use the # output from git cat-file. test_expect_success 'rev-list --disk-usage=human' ' |