Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2023-03-28 16:58:48 +0300
committerJunio C Hamano <gitster@pobox.com>2023-03-28 17:36:45 +0300
commitecb5091fd4301ac647db0bd2504112b38f7ee06d (patch)
tree3b068d4dae3a26444da0fa32e8efa700a50deab6 /list-objects.c
parentcb338c23d6d518947bf6f7240bf30e2ec232bd3b (diff)
cocci: apply the "commit.h" part of "the_repository.pending"
Apply the part of "the_repository.pending.cocci" pertaining to "commit.h". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'list-objects.c')
-rw-r--r--list-objects.c18
1 files changed, 11 insertions, 7 deletions
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) {