[PATCH v5 0/4] merge-ort: implement recursive merges
- From
Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Dec 16, 2020, 22:27 UTC
- Message-ID
- <pull.814.v5.git.1608157682.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.814.v4.git.1608150919.gitgitgadget@gmail.com>
This series depends on en/merge-ort-2 (it does NOT depend on en/merge-ort-3 and can thus be reviewed/merged independently of it).
This short series adds handling of recursive merges (merging of multiple merge-bases to create a virtual merge base) to merge-ort. With this short series the number of test failures under GIT_TEST_MERGE_ALGORITHM=ort drops by 801 (from 1448 to 647).
Changes since v4:
* add an earlier patch in the series that moves reverse_commit_list(), as-is, to commit.c. This also shrinks what is now the second patch.
Elijah Newren (4): commit: move reverse_commit_list() from merge-recursive merge-ort: copy a few small helper functions from merge-recursive.c merge-ort: make clear_internal_opts() aware of partial clearing merge-ort: implement merge_incore_recursive()
commit.c | 11 +++++ commit.h | 3 ++ merge-ort.c | 121 +++++++++++++++++++++++++++++++++++++++++++--- merge-ort.h | 10 ++++ merge-recursive.c | 11 ----- 5 files changed, 138 insertions(+), 18 deletions(-)
base-commit: c5a6f65527aa3b6f5d7cf25437a88d8727ab0646 Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-814%2Fnewren%2Fort-recursive-v5 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-814/newren/ort-recursive-v5 Pull-Request: https://github.com/gitgitgadget/git/pull/814
Range-diff vs v4:
-: ----------- > 1: 9052faeabe6 commit: move reverse_commit_list() from merge-recursive
1: dcf28565ad3 ! 2: 949741932e5 merge-ort: copy a few small helper functions from merge-recursive.c
@@ merge-ort.c: void merge_finalize(struct merge_options *opt,
+ commit->object.parsed = 1;
+ return commit;
+}
-+
-+MAYBE_UNUSED
-+static struct commit_list *reverse_commit_list(struct commit_list *list)
-+{
-+ struct commit_list *previous = NULL, *current, *backup;
-+ for (current = list; current; current = backup) {
-+ backup = current->next;
-+ current->next = previous;
-+ previous = current;
-+ }
-+ return previous;
-+}
+
static void merge_start(struct merge_options *opt, struct merge_result *result)
{
2: bffc45c6570 = 3: 3852125c70b merge-ort: make clear_internal_opts() aware of partial clearing
3: f622d6905d0 ! 4: 63e30492ccb merge-ort: implement merge_incore_recursive()
@@ merge-ort.c: static inline void set_commit_tree(struct commit *c, struct tree *t
static struct commit *make_virtual_commit(struct repository *repo,
struct tree *tree,
const char *comment)
-@@ merge-ort.c: static struct commit *make_virtual_commit(struct repository *repo,
- return commit;
- }
-
--MAYBE_UNUSED
- static struct commit_list *reverse_commit_list(struct commit_list *list)
- {
- struct commit_list *previous = NULL, *current, *backup;
@@ merge-ort.c: static void merge_ort_nonrecursive_internal(struct merge_options *opt,
}
}-- gitgitgadget