Merge branch 'en/merge-ort-recursive'

The ORT merge strategy learned to synthesize virtual ancestor tree
by recursively merging multiple merge bases together, just like the
recursive backend has done for years.

* en/merge-ort-recursive:
  merge-ort: implement merge_incore_recursive()
  merge-ort: make clear_internal_opts() aware of partial clearing
  merge-ort: copy a few small helper functions from merge-recursive.c
  commit: move reverse_commit_list() from merge-recursive
This commit is contained in:
Junio C Hamano
2021-01-06 23:33:44 -08:00
5 changed files with 138 additions and 18 deletions

View File

@ -574,6 +574,17 @@ struct commit_list *copy_commit_list(struct commit_list *list)
return head;
}
struct commit_list *reverse_commit_list(struct commit_list *list)
{
struct commit_list *next = NULL, *current, *backup;
for (current = list; current; current = backup) {
backup = current->next;
current->next = next;
next = current;
}
return next;
}
void free_commit_list(struct commit_list *list)
{
while (list)