| 4468 | } |
| 4469 | |
| 4470 | static void create_boundary_commit_list(struct rev_info *revs) |
| 4471 | { |
| 4472 | unsigned i; |
| 4473 | struct commit *c; |
| 4474 | struct object_array *array = &revs->boundary_commits; |
| 4475 | struct object_array_entry *objects = array->objects; |
| 4476 | |
| 4477 | /* |
| 4478 | * If revs->commits is non-NULL at this point, an error occurred in |
| 4479 | * get_revision_1(). Ignore the error and continue printing the |
| 4480 | * boundary commits anyway. (This is what the code has always |
| 4481 | * done.) |
| 4482 | */ |
| 4483 | commit_list_free(revs->commits); |
| 4484 | revs->commits = NULL; |
| 4485 | |
| 4486 | /* |
| 4487 | * Put all of the actual boundary commits from revs->boundary_commits |
| 4488 | * into revs->commits |
| 4489 | */ |
| 4490 | for (i = 0; i < array->nr; i++) { |
| 4491 | c = (struct commit *)(objects[i].item); |
| 4492 | if (!c) |
| 4493 | continue; |
| 4494 | if (!(c->object.flags & CHILD_SHOWN)) |
| 4495 | continue; |
| 4496 | if (c->object.flags & (SHOWN | BOUNDARY)) |
| 4497 | continue; |
| 4498 | c->object.flags |= BOUNDARY; |
| 4499 | commit_list_insert(c, &revs->commits); |
| 4500 | } |
| 4501 | |
| 4502 | /* |
| 4503 | * If revs->topo_order is set, sort the boundary commits |
| 4504 | * in topological order |
| 4505 | */ |
| 4506 | sort_in_topological_order(&revs->commits, revs->sort_order); |
| 4507 | } |
| 4508 | |
| 4509 | static struct commit *get_revision_internal(struct rev_info *revs) |
| 4510 | { |
no test coverage detected