Thread (1 message) 1 message, 1 author, 2020-10-24

Re: [PATCH 1/4] merge-ort: barebones API of new merge strategy with empty implementation

From: Elijah Newren <hidden>
Date: 2020-10-24 14:55:02

On Sat, Oct 24, 2020 at 3:57 AM Peter Baumann [off-list ref] wrote:
Am Sa., 24. Okt. 2020 um 11:58 Uhr schrieb Peter Baumann [off-list ref]:
quoted
quoted
Am Do., 22. Okt. 2020 um 03:28 Uhr schrieb Elijah Newren via GitGitGadget [off-list ref]:
[... ]
quoted
diff --git a/merge-ort.h b/merge-ort.h
new file mode 100644
index 0000000000..9c655cd3ad
--- /dev/null
+++ b/merge-ort.h
@@ -0,0 +1,49 @@
+#ifndef MERGE_ORT_H
+#define MERGE_ORT_H
+
+#include "merge-recursive.h"
+
+struct commit;
+struct tree;
+
+struct merge_result {
+       /* whether the merge is clean */
+       int clean;
+
+       /* Result of merge.  If !clean, represents what would go in worktree */
+       struct tree *tree;
+
+       /*
+        * Additional metadata used by merge_switch_to_result() or future calls
+        * to merge_inmemory_*().
+        */
+       unsigned _;
+       void *priv;
+};
+
+/* rename-detecting three-way merge, no recursion. */
                                                                    ^^^^^^^^^^^^
quoted
+void merge_inmemory_recursive(struct merge_options *opt,
                                            ^^^^^^^^
quoted
+                             struct commit_list *merge_bases,
+                             struct commit *side1,
+                             struct commit *side2,
+                             struct merge_result *result);
+
+/* rename-detecting three-way merge with recursive ancestor consolidation. */
                                                                   ^^^^^^^^^^^^^^^^^^^^^^
quoted
+void merge_inmemory_nonrecursive(struct merge_options *opt,
                                            ^^^^^^^^^^^^^
quoted
+                                struct tree *merge_base,
+                                struct tree *side1,
+                                struct tree *side2,
+                                struct merge_result *result);
+
[...]

Looks like the comments above don't match the method names they are describing.
I assume they should be just switched?
Whoops, indeed.  Will fix; thanks for spotting.
quoted
quoted
-Peter
Sorry, I completely messed up the markers. Serves me well for not using a fixed with font.
Here it is again, highlighting only the relevant section:
quoted
+/* rename-detecting three-way merge, no recursion. */
                                        ^^^^^^^^^^^^^
quoted
+void merge_inmemory_recursive(struct merge_options *opt,
                       ^^^^^^^^^

[...]
quoted
+/* rename-detecting three-way merge with recursive ancestor consolidation. */
                                 ^^^^^^^^^^^^^^^^^^^^^^
quoted
+void merge_inmemory_nonrecursive(struct merge_options *opt,
                       ^^^^^^^^^^^^
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help