From ecb5091fd4301ac647db0bd2504112b38f7ee06d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 28 Mar 2023 15:58:48 +0200 Subject: cocci: apply the "commit.h" part of "the_repository.pending" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the part of "the_repository.pending.cocci" pertaining to "commit.h". Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- list-objects.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'list-objects.c') diff --git a/list-objects.c b/list-objects.c index 7528fe1db2..5550b3aafe 100644 --- a/list-objects.c +++ b/list-objects.c @@ -227,7 +227,8 @@ static void mark_edge_parents_uninteresting(struct commit *commit, struct commit *parent = parents->item; if (!(parent->object.flags & UNINTERESTING)) continue; - mark_tree_uninteresting(revs->repo, get_commit_tree(parent)); + mark_tree_uninteresting(revs->repo, + repo_get_commit_tree(the_repository, parent)); if (revs->edge_hint && !(parent->object.flags & SHOWN)) { parent->object.flags |= SHOWN; show_edge(parent); @@ -244,7 +245,8 @@ static void add_edge_parents(struct commit *commit, for (parents = commit->parents; parents; parents = parents->next) { struct commit *parent = parents->item; - struct tree *tree = get_commit_tree(parent); + struct tree *tree = repo_get_commit_tree(the_repository, + parent); if (!tree) continue; @@ -275,7 +277,8 @@ void mark_edges_uninteresting(struct rev_info *revs, for (list = revs->commits; list; list = list->next) { struct commit *commit = list->item; - struct tree *tree = get_commit_tree(commit); + struct tree *tree = repo_get_commit_tree(the_repository, + commit); if (commit->object.flags & UNINTERESTING) tree->object.flags |= UNINTERESTING; @@ -291,7 +294,7 @@ void mark_edges_uninteresting(struct rev_info *revs, struct commit *commit = list->item; if (commit->object.flags & UNINTERESTING) { mark_tree_uninteresting(revs->repo, - get_commit_tree(commit)); + repo_get_commit_tree(the_repository, commit)); if (revs->edge_hint_aggressive && !(commit->object.flags & SHOWN)) { commit->object.flags |= SHOWN; show_edge(commit); @@ -309,7 +312,7 @@ void mark_edges_uninteresting(struct rev_info *revs, if (obj->type != OBJ_COMMIT || !(obj->flags & UNINTERESTING)) continue; mark_tree_uninteresting(revs->repo, - get_commit_tree(commit)); + repo_get_commit_tree(the_repository, commit)); if (!(obj->flags & SHOWN)) { obj->flags |= SHOWN; show_edge(commit); @@ -376,8 +379,9 @@ static void do_traverse(struct traversal_context *ctx) */ if (!ctx->revs->tree_objects) ; /* do not bother loading tree */ - else if (get_commit_tree(commit)) { - struct tree *tree = get_commit_tree(commit); + else if (repo_get_commit_tree(the_repository, commit)) { + struct tree *tree = repo_get_commit_tree(the_repository, + commit); tree->object.flags |= NOT_USER_GIVEN; add_pending_tree(ctx->revs, tree); } else if (commit->object.parsed) { -- cgit v1.2.3