cocci: apply rules to rewrite callers of "refs" interfaces

Apply the rules that rewrite callers of "refs" interfaces to explicitly
pass `struct ref_store`. The resulting patch has been applied with the
`--whitespace=fix` option.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2024-05-07 09:11:53 +02:00
committed by Junio C Hamano
parent b198ee0b3d
commit 2e5c4758b7
75 changed files with 711 additions and 436 deletions

View File

@ -286,7 +286,8 @@ int walker_fetch(struct walker *walker, int targets, char **target,
ALLOC_ARRAY(oids, targets);
if (write_ref) {
transaction = ref_transaction_begin(&err);
transaction = ref_store_transaction_begin(get_main_ref_store(the_repository),
&err);
if (!transaction) {
error("%s", err.buf);
goto done;
@ -294,7 +295,8 @@ int walker_fetch(struct walker *walker, int targets, char **target,
}
if (!walker->get_recover) {
for_each_ref(mark_complete, NULL);
refs_for_each_ref(get_main_ref_store(the_repository),
mark_complete, NULL);
commit_list_sort_by_date(&complete);
}