Merge branch 'jk/promisor-optim'
Handling of "promisor packs" that allows certain objects to be missing and lazily retrievable has been optimized (a bit). * jk/promisor-optim: revision: avoid parsing with --exclude-promisor-objects lookup_unknown_object(): take a repository argument is_promisor_object(): free tree buffer after parsing
This commit is contained in:
@ -26,8 +26,8 @@ int cmd__example_decorate(int argc, const char **argv)
|
||||
* Add 2 objects, one with a non-NULL decoration and one with a NULL
|
||||
* decoration.
|
||||
*/
|
||||
one = lookup_unknown_object(&one_oid);
|
||||
two = lookup_unknown_object(&two_oid);
|
||||
one = lookup_unknown_object(the_repository, &one_oid);
|
||||
two = lookup_unknown_object(the_repository, &two_oid);
|
||||
ret = add_decoration(&n, one, &decoration_a);
|
||||
if (ret)
|
||||
BUG("when adding a brand-new object, NULL should be returned");
|
||||
@ -56,7 +56,7 @@ int cmd__example_decorate(int argc, const char **argv)
|
||||
ret = lookup_decoration(&n, two);
|
||||
if (ret != &decoration_b)
|
||||
BUG("lookup should return added declaration");
|
||||
three = lookup_unknown_object(&three_oid);
|
||||
three = lookup_unknown_object(the_repository, &three_oid);
|
||||
ret = lookup_decoration(&n, three);
|
||||
if (ret)
|
||||
BUG("lookup for unknown object should return NULL");
|
||||
|
@ -23,4 +23,16 @@ test_perf 'checkout of result' '
|
||||
git -C worktree checkout -f
|
||||
'
|
||||
|
||||
test_perf 'fsck' '
|
||||
git -C bare.git fsck
|
||||
'
|
||||
|
||||
test_perf 'count commits' '
|
||||
git -C bare.git rev-list --all --count
|
||||
'
|
||||
|
||||
test_perf 'count non-promisor commits' '
|
||||
git -C bare.git rev-list --all --count --exclude-promisor-objects
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user