diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-05-07 09:11:53 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-07 10:06:59 -0700 |
| commit | 2e5c4758b75f7cbae612c89b177aa045fa4f9c68 (patch) | |
| tree | 4836d2b3c740848d105355f0c6150f32acdcd0de /log-tree.c | |
| parent | cocci: introduce rules to transform "refs" to pass ref store (diff) | |
| download | git-2e5c4758b75f7cbae612c89b177aa045fa4f9c68.tar.gz git-2e5c4758b75f7cbae612c89b177aa045fa4f9c68.zip | |
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>
Diffstat (limited to 'log-tree.c')
| -rw-r--r-- | log-tree.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/log-tree.c b/log-tree.c index 16031b44e7..41416de4e3 100644 --- a/log-tree.c +++ b/log-tree.c @@ -232,8 +232,10 @@ void load_ref_decorations(struct decoration_filter *filter, int flags) } decoration_loaded = 1; decoration_flags = flags; - for_each_ref(add_ref_decoration, filter); - head_ref(add_ref_decoration, filter); + refs_for_each_ref(get_main_ref_store(the_repository), + add_ref_decoration, filter); + refs_head_ref(get_main_ref_store(the_repository), + add_ref_decoration, filter); for_each_commit_graft(add_graft_decoration, filter); } } @@ -277,7 +279,8 @@ static const struct name_decoration *current_pointed_by_HEAD(const struct name_d return NULL; /* Now resolve and find the matching current branch */ - branch_name = resolve_ref_unsafe("HEAD", 0, NULL, &rru_flags); + branch_name = refs_resolve_ref_unsafe(get_main_ref_store(the_repository), + "HEAD", 0, NULL, &rru_flags); if (!branch_name || !(rru_flags & REF_ISSYMREF)) return NULL; |
