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>
This commit is contained in:

committed by
Junio C Hamano

parent
cb338c23d6
commit
ecb5091fd4
@ -585,7 +585,7 @@ int ref_newer(const struct object_id *new_oid, const struct object_id *old_oid)
|
||||
return 0;
|
||||
new_commit = (struct commit *) o;
|
||||
|
||||
if (parse_commit(new_commit) < 0)
|
||||
if (repo_parse_commit(the_repository, new_commit) < 0)
|
||||
return 0;
|
||||
|
||||
commit_list_insert(old_commit, &old_commit_list);
|
||||
@ -749,7 +749,7 @@ int can_all_from_reach_with_flag(struct object_array *from,
|
||||
}
|
||||
|
||||
list[nr_commits] = (struct commit *)from_one;
|
||||
if (parse_commit(list[nr_commits]) ||
|
||||
if (repo_parse_commit(the_repository, list[nr_commits]) ||
|
||||
commit_graph_generation(list[nr_commits]) < min_generation) {
|
||||
result = 0;
|
||||
goto cleanup;
|
||||
@ -784,7 +784,7 @@ int can_all_from_reach_with_flag(struct object_array *from,
|
||||
if (!(parent->item->object.flags & assign_flag)) {
|
||||
parent->item->object.flags |= assign_flag;
|
||||
|
||||
if (parse_commit(parent->item) ||
|
||||
if (repo_parse_commit(the_repository, parent->item) ||
|
||||
parent->item->date < min_commit_date ||
|
||||
commit_graph_generation(parent->item) < min_generation)
|
||||
continue;
|
||||
@ -826,7 +826,7 @@ int can_all_from_reach(struct commit_list *from, struct commit_list *to,
|
||||
while (from_iter) {
|
||||
add_object_array(&from_iter->item->object, NULL, &from_objs);
|
||||
|
||||
if (!parse_commit(from_iter->item)) {
|
||||
if (!repo_parse_commit(the_repository, from_iter->item)) {
|
||||
timestamp_t generation;
|
||||
if (from_iter->item->date < min_commit_date)
|
||||
min_commit_date = from_iter->item->date;
|
||||
@ -840,7 +840,7 @@ int can_all_from_reach(struct commit_list *from, struct commit_list *to,
|
||||
}
|
||||
|
||||
while (to_iter) {
|
||||
if (!parse_commit(to_iter->item)) {
|
||||
if (!repo_parse_commit(the_repository, to_iter->item)) {
|
||||
timestamp_t generation;
|
||||
if (to_iter->item->date < min_commit_date)
|
||||
min_commit_date = to_iter->item->date;
|
||||
@ -890,7 +890,7 @@ struct commit_list *get_reachable_subset(struct commit **from, int nr_from,
|
||||
timestamp_t generation;
|
||||
struct commit *c = *item;
|
||||
|
||||
parse_commit(c);
|
||||
repo_parse_commit(the_repository, c);
|
||||
generation = commit_graph_generation(c);
|
||||
if (generation < min_generation)
|
||||
min_generation = generation;
|
||||
@ -905,7 +905,7 @@ struct commit_list *get_reachable_subset(struct commit **from, int nr_from,
|
||||
struct commit *c = *item;
|
||||
if (!(c->object.flags & PARENT2)) {
|
||||
c->object.flags |= PARENT2;
|
||||
parse_commit(c);
|
||||
repo_parse_commit(the_repository, c);
|
||||
|
||||
prio_queue_put(&queue, *item);
|
||||
}
|
||||
@ -924,7 +924,7 @@ struct commit_list *get_reachable_subset(struct commit **from, int nr_from,
|
||||
for (parents = current->parents; parents; parents = parents->next) {
|
||||
struct commit *p = parents->item;
|
||||
|
||||
parse_commit(p);
|
||||
repo_parse_commit(the_repository, p);
|
||||
|
||||
if (commit_graph_generation(p) < min_generation)
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user