diff options
author | Patrick Steinhardt <ps@pks.im> | 2025-03-12 16:56:13 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-03-12 11:31:18 -0700 |
commit | 268ea8515cd11bd0f3f8c4d64373121058c3fac2 (patch) | |
tree | 9a5f9d104d01e89e7bb3eca3e41e404f5f4ad053 /builtin/count-objects.c | |
parent | 6c90726bebfd8ec4dd429f1fad9d00112b1b6603 (diff) |
refs/files: batch refname availability checks for initial transactions
The "files" backend explicitly carves out special logic for its initial
transaction so that it can avoid writing out every single reference as
a loose reference. While the assumption is that there shouldn't be any
preexisting references, we still have to verify that none of the newly
written references will conflict with any other new reference in the
same transaction.
Refactor the initial transaction to use batched refname availability
checks. This does not yet have an effect on performance as we still call
`refs_verify_refname_available()` in a loop. But this will change in
subsequent commits and then impact performance when cloning a repository
with many references or when migrating references to the "files" format.
This will improve performance when cloning a repository with many
references or when migrating references from any format to the "files"
format once the availability checks have learned to optimize checks for
many references in a subsequent commit.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/count-objects.c')
0 files changed, 0 insertions, 0 deletions