summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-01-07 07:33:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-01-07 07:33:44 (GMT)
commit45a177069f1ed9f56ab13cd34c654ecc5376945b (patch)
treeb240857a0ea72029ec1e86ba291b33b1a4b3664e /commit.c
parentd3fa84d52873cdf3852e41b684ab93475fe4424f (diff)
parent8119214f4e7036cef01a8e13f161ec510b3ff710 (diff)
downloadgit-45a177069f1ed9f56ab13cd34c654ecc5376945b.zip
git-45a177069f1ed9f56ab13cd34c654ecc5376945b.tar.gz
git-45a177069f1ed9f56ab13cd34c654ecc5376945b.tar.bz2
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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/commit.c b/commit.c
index 9a785bf..f128f18 100644
--- a/commit.c
+++ b/commit.c
@@ -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)