diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-01-06 23:33:44 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-01-06 23:33:44 -0800 |
commit | 45a177069f1ed9f56ab13cd34c654ecc5376945b (patch) | |
tree | b240857a0ea72029ec1e86ba291b33b1a4b3664e /commit.c | |
parent | d3fa84d52873cdf3852e41b684ab93475fe4424f (diff) | |
parent | 8119214f4e7036cef01a8e13f161ec510b3ff710 (diff) | |
download | git-45a177069f1ed9f56ab13cd34c654ecc5376945b.tar.gz |
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
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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) |