mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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:
committed by
Junio C Hamano
parent
b198ee0b3d
commit
2e5c4758b7
@@ -1233,7 +1233,8 @@ int push_unpushed_submodules(struct repository *r,
|
||||
char *head;
|
||||
struct object_id head_oid;
|
||||
|
||||
head = resolve_refdup("HEAD", 0, &head_oid, NULL);
|
||||
head = refs_resolve_refdup(get_main_ref_store(the_repository),
|
||||
"HEAD", 0, &head_oid, NULL);
|
||||
if (!head)
|
||||
die(_("Failed to resolve HEAD as a valid ref."));
|
||||
|
||||
@@ -1271,7 +1272,8 @@ static int append_oid_to_array(const char *ref UNUSED,
|
||||
void check_for_new_submodule_commits(struct object_id *oid)
|
||||
{
|
||||
if (!initialized_fetch_ref_tips) {
|
||||
for_each_ref(append_oid_to_array, &ref_tips_before_fetch);
|
||||
refs_for_each_ref(get_main_ref_store(the_repository),
|
||||
append_oid_to_array, &ref_tips_before_fetch);
|
||||
initialized_fetch_ref_tips = 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user