git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v4 04/12] merge-tree: implement real merges

From
Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>
Date
Feb 12, 2022, 20:34 UTC
Message-ID
<d7b51da94e65db79aa59ca331e178741d3c50bc2.1644698093.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.1122.v4.git.1644698093.gitgitgadget@gmail.com>
From: Elijah Newren <newren@gmail.com>

This adds the ability to perform real merges rather than just trivial merges (meaning handling three way content merges, recursive ancestor consolidation, renames, proper directory/file conflict handling, and so forth). However, unlike `git merge`, the working tree and index are left alone and no branch is updated.

The only output is:
  - the toplevel resulting tree printed on stdout
  - exit status of 0 (clean), 1 (conflicts present), anything else
    (merge could not be performed; unknown if clean or conflicted)

This output is meant to be used by some higher level script, perhaps in a sequence of steps like this:

   NEWTREE=$(git merge-tree --write-tree $BRANCH1 $BRANCH2)
   test $? -eq 0 || die "There were conflicts..."
   NEWCOMMIT=$(git commit-tree $NEWTREE -p $BRANCH1 -p $BRANCH2)
   git update-ref $BRANCH1 $NEWCOMMIT

Note that higher level scripts may also want to access the conflict/warning messages normally output during a merge, or have quick access to a list of files with conflicts. That is not available in this preliminary implementation, but subsequent commits will add that ability (meaning that NEWTREE would be a lot more than a tree in the case of conflicts).

This also marks the traditional trivial merge of merge-tree as deprecated. The trivial merge not only had limited applicability, the output format was also difficult to work with (and its format undocumented), and will generally be less performant than real merges.

Signed-off-by: Elijah Newren <newren@gmail.com>
---
 Documentation/git-merge-tree.txt |  79 +++++++++++++++++++----
 builtin/merge-tree.c             |  44 ++++++++++++-
 t/t4301-merge-tree-write-tree.sh | 106 +++++++++++++++++++++++++++++++
 3 files changed, 216 insertions(+), 13 deletions(-)
 create mode 100755 t/t4301-merge-tree-write-tree.sh
diff --git a/Documentation/git-merge-tree.txt b/Documentation/git-merge-tree.txt
index 58731c19422..586733ea564 100644
--- a/Documentation/git-merge-tree.txt
+++ b/Documentation/git-merge-tree.txt
@@ -3,26 +3,81 @@ git-merge-tree(1)
 
 NAME
 ----
-git-merge-tree - Show three-way merge without touching index
+git-merge-tree - Perform merge without touching index or working tree
 
 
 SYNOPSIS
 --------
 [verse]
-'git merge-tree' <base-tree> <branch1> <branch2>
+'git merge-tree' [--write-tree] <branch1> <branch2>
+'git merge-tree' [--trivial-merge] <base-tree> <branch1> <branch2> (deprecated)
 
 DESCRIPTION
 -----------
-Reads three tree-ish, and output trivial merge results and
-conflicting stages to the standard output.  This is similar to
-what three-way 'git read-tree -m' does, but instead of storing the
-results in the index, the command outputs the entries to the
-standard output.
-
-This is meant to be used by higher level scripts to compute
-merge results outside of the index, and stuff the results back into the
-index.  For this reason, the output from the command omits
-entries that match the <branch1> tree.
+
+Performs a merge, but does not make any new commits and does not read
+from or write to either the working tree or index.
+
+The first form will merge the two branches, doing a real merge.  A real
+merge is distinguished from a trivial merge in that it includes:
+
+  * three way content merges of individual files
+  * rename detection
+  * proper directory/file conflict handling
+  * recursive ancestor consolidation (i.e. when there is more than one
+    merge base, creating a virtual merge base by merging the merge bases)
+  * etc.
+
+After the merge completes, the first form will create a new toplevel
+tree object.  See `OUTPUT` below for details.
+
+The second form is deprecated; it is kept for backward compatibility
+reasons but may be deleted in the future.  Other than the optional
+`--trivial-merge`, it accepts no options.  It can only do a trivial
+merge.  It reads three tree-ish, and outputs trivial merge results and
+conflicting stages to the standard output in a semi-diff format.
+Since this was designed for higher level scripts to consume and merge
+the results back into the index, it omits entries that match
+<branch1>.  The result of this second form is is similar to what
+three-way 'git read-tree -m' does, but instead of storing the results
+in the index, the command outputs the entries to the standard output.
+This form not only has limited applicability, the output format is
+also difficult to work with, and it will generally be less performant
+than the first form even on successful merges (especially if working
+in large repositories).  The remainder of this manual will only
+discuss the first form.
+
+OUTPUT
+------
+
+For either a successful or conflicted merge, the output from
+git-merge-tree is simply one line:
+
+	<OID of toplevel tree>
+
+The printed tree object corresponds to what would be checked out in
+the working tree at the end of `git merge`, and thus may have files
+with conflict markers in them.
+
+EXIT STATUS
+-----------
+
+For a successful, non-conflicted merge, the exit status is 0.  When the
+merge has conflicts, the exit status is 1.  If the merge is not able to
+complete (or start) due to some kind of error, the exit status is
+something other than 0 or 1 (and the output is unspecified).
+
+USAGE NOTES
+-----------
+
+git-merge-tree was written to be low-level plumbing, similar to
+hash-object, mktree, commit-tree, write-tree, update-ref, and mktag.
+Thus, it could be used as a part of a series of steps such as
+
+       NEWTREE=$(git merge-tree --write-tree $BRANCH1 $BRANCH2)
+       test $? -eq 0 || die "There were conflicts..."
+       NEWCOMMIT=$(git commit-tree $NEWTREE -p $BRANCH1 -p $BRANCH2)
+       git update-ref $BRANCH1 $NEWCOMMIT
 
 GIT
 ---
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c
index 0f9d928e862..af445cb1576 100644
--- a/builtin/merge-tree.c
+++ b/builtin/merge-tree.c
@@ -2,6 +2,9 @@
 #include "builtin.h"
 #include "tree-walk.h"
 #include "xdiff-interface.h"
+#include "help.h"
+#include "commit-reach.h"
+#include "merge-ort.h"
 #include "object-store.h"
 #include "parse-options.h"
 #include "repository.h"
@@ -398,7 +401,46 @@ struct merge_tree_options {
 static int real_merge(struct merge_tree_options *o,
 		      const char *branch1, const char *branch2)
 {
-	die(_("real merges are not yet implemented"));
+	struct commit *parent1, *parent2;
+	struct commit_list *common;
+	struct commit_list *merge_bases = NULL;
+	struct commit_list *j;
+	struct merge_options opt;
+	struct merge_result result = { 0 };
+
+	parent1 = get_merge_parent(branch1);
+	if (!parent1)
+		help_unknown_ref(branch1, "merge-tree",
+				 _("not something we can merge"));
+
+	parent2 = get_merge_parent(branch2);
+	if (!parent2)
+		help_unknown_ref(branch2, "merge-tree",
+				 _("not something we can merge"));
+
+	init_merge_options(&opt, the_repository);
+
+	opt.show_rename_progress = 0;
+
+	opt.branch1 = branch1;
+	opt.branch2 = branch2;
+
+	/*
+	 * Get the merge bases, in reverse order; see comment above
+	 * merge_incore_recursive in merge-ort.h
+	 */
+	common = get_merge_bases(parent1, parent2);
+	if (!common)
+		die(_("refusing to merge unrelated histories"));
+	for (j = common; j; j = j->next)
+		commit_list_insert(j->item, &merge_bases);
+
+	merge_incore_recursive(&opt, merge_bases, parent1, parent2, &result);
+	if (result.clean < 0)
+		die(_("failure to merge"));
+	puts(oid_to_hex(&result.tree->object.oid));
+	merge_finalize(&opt, &result);
+	return !result.clean; /* result.clean < 0 handled above */
 }
 
 int cmd_merge_tree(int argc, const char **argv, const char *prefix)
diff --git a/t/t4301-merge-tree-write-tree.sh b/t/t4301-merge-tree-write-tree.sh
new file mode 100755
index 00000000000..e4f9421c105
--- /dev/null
+++ b/t/t4301-merge-tree-write-tree.sh
@@ -0,0 +1,106 @@
+#!/bin/sh
+
+test_description='git merge-tree --write-tree'
+
+. ./test-lib.sh
+
+# This test is ort-specific
+if test "${GIT_TEST_MERGE_ALGORITHM}" != "ort"
+then
+	skip_all="GIT_TEST_MERGE_ALGORITHM != ort"
+	test_done
+fi
+
+test_expect_success setup '
+	test_write_lines 1 2 3 4 5 >numbers &&
+	echo hello >greeting &&
+	echo foo >whatever &&
+	git add numbers greeting whatever &&
+	test_tick &&
+	git commit -m initial &&
+
+	git branch side1 &&
+	git branch side2 &&
+	git branch side3 &&
+
+	git checkout side1 &&
+	test_write_lines 1 2 3 4 5 6 >numbers &&
+	echo hi >greeting &&
+	echo bar >whatever &&
+	git add numbers greeting whatever &&
+	test_tick &&
+	git commit -m modify-stuff &&
+
+	git checkout side2 &&
+	test_write_lines 0 1 2 3 4 5 >numbers &&
+	echo yo >greeting &&
+	git rm whatever &&
+	mkdir whatever &&
+	>whatever/empty &&
+	git add numbers greeting whatever/empty &&
+	test_tick &&
+	git commit -m other-modifications &&
+
+	git checkout side3 &&
+	git mv numbers sequence &&
+	test_tick &&
+	git commit -m rename-numbers
+'
+
+test_expect_success 'Clean merge' '
+	git merge-tree --write-tree side1 side3 >RESULT &&
+	q_to_tab <<-EOF >expect &&
+	100644 blob $(git rev-parse side1:greeting)Qgreeting
+	100644 blob $(git rev-parse side1:numbers)Qsequence
+	100644 blob $(git rev-parse side1:whatever)Qwhatever
+	EOF
+
+	git ls-tree $(cat RESULT) >actual &&
+	test_cmp expect actual
+'
+
+test_expect_success 'Content merge and a few conflicts' '
+	git checkout side1^0 &&
+	test_must_fail git merge side2 &&
+	expected_tree=$(cat .git/AUTO_MERGE) &&
+
+	# We will redo the merge, while we are still in a conflicted state!
+	test_when_finished "git reset --hard" &&
+
+	test_expect_code 1 git merge-tree --write-tree side1 side2 >RESULT &&
+	actual_tree=$(head -n 1 RESULT) &&
+
+	# Due to differences of e.g. "HEAD" vs "side1", the results will not
+	# exactly match.  Dig into individual files.
+
+	# Numbers should have three-way merged cleanly
+	test_write_lines 0 1 2 3 4 5 6 >expect &&
+	git show ${actual_tree}:numbers >actual &&
+	test_cmp expect actual &&
+
+	# whatever and whatever~<branch> should have same HASHES
+	git rev-parse ${expected_tree}:whatever ${expected_tree}:whatever~HEAD >expect &&
+	git rev-parse ${actual_tree}:whatever ${actual_tree}:whatever~side1 >actual &&
+	test_cmp expect actual &&
+
+	# greeting should have a merge conflict
+	git show ${expected_tree}:greeting >tmp &&
+	cat tmp | sed -e s/HEAD/side1/ >expect &&
+	git show ${actual_tree}:greeting >actual &&
+	test_cmp expect actual
+'
+
+test_expect_success 'Barf on misspelled option, with exit code other than 0 or 1' '
+	# Mis-spell with single "s" instead of double "s"
+	test_expect_code 129 git merge-tree --write-tree --mesages FOOBAR side1 side2 2>expect &&
+
+	grep "error: unknown option.*mesages" expect
+'
+
+test_expect_success 'Barf on too many arguments' '
+	test_expect_code 129 git merge-tree --write-tree side1 side2 invalid 2>expect &&
+
+	grep "^usage: git merge-tree" expect
+'
+
+test_done
-- 
gitgitgadget
Previous: Elijah Newren via GitGitGadgetNext: Junio C Hamano
Message 174 of 240 in “RFC: In-core git merge-tree ("Server side merges")”
  1. 00/12 RFC: In-core git merge-tree ("Server side merges")Elijah Newren via GitGitGadget, Jan 22, 2022
  2. 01/12 merge-tree: rename merge_trees() to trivial_merge_trees()Elijah Newren via GitGitGadget, Jan 22, 2022
  3. 02/12 merge-tree: move logic for existing merge into new functionElijah Newren via GitGitGadget, Jan 22, 2022
  4. 03/12 merge-tree: add option parsing and initial shell for real merge functionElijah Newren via GitGitGadget, Jan 22, 2022
  5. René ScharfeJan 23, 2022
  6. Elijah NewrenJan 24, 2022
  7. Ævar Arnfjörð BjarmasonJan 24, 2022
  8. Elijah NewrenJan 24, 2022
  9. 04/12 merge-tree: implement real mergesElijah Newren via GitGitGadget, Jan 22, 2022
  10. Ævar Arnfjörð BjarmasonJan 24, 2022
  11. Elijah NewrenJan 24, 2022
  12. Johannes SchindelinJan 25, 2022
  13. Christian CouderJan 26, 2022
  14. Elijah NewrenJan 29, 2022
  15. 05/12 merge-ort: split out a separate display_update_messages() functionElijah Newren via GitGitGadget, Jan 22, 2022
  16. Ævar Arnfjörð BjarmasonJan 24, 2022
  17. Elijah NewrenJan 25, 2022
  18. Johannes SchindelinJan 28, 2022
  19. 07/12 merge-tree: support including merge messages in outputElijah Newren via GitGitGadget, Jan 22, 2022
  20. Christian CouderJan 26, 2022
  21. Elijah NewrenJan 29, 2022
  22. Johannes SchindelinJan 28, 2022
  23. Elijah NewrenJan 29, 2022
  24. 06/12 merge-ort: allow update messages to be written to different file streamElijah Newren via GitGitGadget, Jan 22, 2022
  25. Johannes SchindelinJan 28, 2022
  26. Elijah NewrenJan 29, 2022
  27. 10/12 merge-tree: provide easy access to `ls-files -u` style infoElijah Newren via GitGitGadget, Jan 22, 2022
  28. Ævar Arnfjörð BjarmasonJan 24, 2022
  29. Elijah NewrenJan 24, 2022
  30. 08/12 merge-ort: provide a merge_get_conflicted_files() helper functionElijah Newren via GitGitGadget, Jan 22, 2022
  31. Christian CouderJan 26, 2022
  32. Elijah NewrenJan 29, 2022
  33. Christian CouderJan 26, 2022
  34. Elijah NewrenJan 29, 2022
  35. Johannes SchindelinJan 28, 2022
  36. Elijah NewrenJan 29, 2022
  37. Johannes SixtJan 29, 2022
  38. Elijah NewrenJan 29, 2022
  39. Johannes SchindelinFeb 4, 2022
  40. Elijah NewrenFeb 5, 2022
  41. Johannes SchindelinFeb 21, 2022
  42. Ævar Arnfjörð BjarmasonFeb 21, 2022
  43. machine-parsable git-merge-tree messages (was: [PATCH 08/12] merge-ort: provide a merge_get_conflicted_files() helper function)Ævar Arnfjörð Bjarmason, Feb 21, 2022
  44. Elijah NewrenFeb 23, 2022
  45. Ævar Arnfjörð BjarmasonFeb 28, 2022
  46. Elijah NewrenMar 1, 2022
  47. Johannes SchindelinFeb 22, 2022
  48. Elijah NewrenFeb 23, 2022
  49. Johannes SchindelinFeb 25, 2022
  50. Elijah NewrenFeb 23, 2022
  51. Johannes SchindelinFeb 25, 2022
  52. Junio C HamanoFeb 25, 2022
  53. Elijah NewrenFeb 26, 2022
  54. Johannes SchindelinMar 7, 2022
  55. Elijah NewrenMar 8, 2022
  56. Johannes SchindelinMar 10, 2022
  57. Johannes SchindelinMay 13, 2022
  58. Elijah NewrenMay 17, 2022
  59. Johannes SchindelinJun 3, 2022
  60. Johannes SchindelinJun 5, 2022
  61. Johannes SchindelinJun 5, 2022
  62. Johannes SchindelinJun 6, 2022
  63. Elijah NewrenJun 7, 2022
  64. Elijah NewrenJun 17, 2022
  65. Johannes SchindelinJun 18, 2022
  66. 11/12 merge-tree: add a --allow-unrelated-histories flagElijah Newren via GitGitGadget, Jan 22, 2022
  67. 12/12 git-merge-tree.txt: add a section on potentional usage mistakesElijah Newren via GitGitGadget, Jan 22, 2022
  68. 09/12 merge-tree: provide a list of which files have conflictsElijah Newren via GitGitGadget, Jan 22, 2022
  69. Ævar Arnfjörð BjarmasonJan 24, 2022
  70. Elijah NewrenJan 24, 2022
  71. Johannes SchindelinJan 28, 2022
  72. Elijah NewrenJan 29, 2022
  73. Johannes SchindelinFeb 4, 2022
  74. Christian CouderJan 26, 2022
  75. Johannes SchindelinJan 26, 2022
  76. Christian CouderJan 26, 2022
  77. Johannes SchindelinJan 28, 2022
  78. Christian CouderJan 28, 2022
  79. Johannes SchindelinJan 28, 2022
  80. Elijah NewrenJan 29, 2022
  81. Christian CouderJan 29, 2022
  82. Elijah NewrenJan 29, 2022
  83. Elijah NewrenJan 31, 2022
  84. Johannes SchindelinJan 28, 2022
  85. 00/13 In-core git merge-tree ("Server side merges")Elijah Newren via GitGitGadget, Jan 29, 2022
  86. 01/13 merge-tree: rename merge_trees() to trivial_merge_trees()Elijah Newren via GitGitGadget, Jan 29, 2022
  87. 02/13 merge-tree: move logic for existing merge into new functionElijah Newren via GitGitGadget, Jan 29, 2022
  88. 03/13 merge-tree: add option parsing and initial shell for real merge functionElijah Newren via GitGitGadget, Jan 29, 2022
  89. Junio C HamanoFeb 2, 2022
  90. 04/13 merge-tree: implement real mergesElijah Newren via GitGitGadget, Jan 29, 2022
  91. Junio C HamanoFeb 2, 2022
  92. Elijah NewrenFeb 2, 2022
  93. Johannes SchindelinFeb 21, 2022
  94. 05/13 diff: allow diff_warn_rename_limit to write somewhere besides stdoutJohannes Schindelin via GitGitGadget, Jan 29, 2022
  95. 06/13 merge-ort: split out a separate display_update_messages() functionElijah Newren via GitGitGadget, Jan 29, 2022
  96. 07/13 merge-ort: allow update messages to be written to different file streamElijah Newren via GitGitGadget, Jan 29, 2022
  97. 11/13 merge-tree: provide easy access to `ls-files -u` style infoElijah Newren via GitGitGadget, Jan 29, 2022
  98. Junio C HamanoFeb 2, 2022
  99. Elijah NewrenFeb 2, 2022
  100. Ævar Arnfjörð BjarmasonFeb 3, 2022
  101. Elijah NewrenFeb 3, 2022
  102. 10/13 merge-tree: provide a list of which files have conflictsElijah Newren via GitGitGadget, Jan 29, 2022
  103. Junio C HamanoFeb 2, 2022
  104. Junio C HamanoFeb 2, 2022
  105. Junio C HamanoFeb 3, 2022
  106. 09/13 merge-ort: provide a merge_get_conflicted_files() helper functionElijah Newren via GitGitGadget, Jan 29, 2022
  107. 08/13 merge-tree: support including merge messages in outputElijah Newren via GitGitGadget, Jan 29, 2022
  108. Junio C HamanoFeb 2, 2022
  109. Elijah NewrenFeb 2, 2022
  110. 13/13 git-merge-tree.txt: add a section on potentional usage mistakesElijah Newren via GitGitGadget, Jan 29, 2022
  111. 12/13 merge-tree: add a --allow-unrelated-histories flagElijah Newren via GitGitGadget, Jan 29, 2022
  112. Junio C HamanoFeb 2, 2022
  113. 00/15 In-core git merge-tree ("Server side merges")Elijah Newren via GitGitGadget, Feb 2, 2022
  114. 01/15 merge-tree: rename merge_trees() to trivial_merge_trees()Elijah Newren via GitGitGadget, Feb 2, 2022
  115. 02/15 merge-tree: move logic for existing merge into new functionElijah Newren via GitGitGadget, Feb 2, 2022
  116. 03/15 merge-tree: add option parsing and initial shell for real merge functionElijah Newren via GitGitGadget, Feb 2, 2022
  117. Ævar Arnfjörð BjarmasonFeb 3, 2022
  118. Elijah NewrenFeb 3, 2022
  119. Elijah NewrenFeb 3, 2022
  120. Ævar Arnfjörð BjarmasonFeb 3, 2022
  121. Elijah NewrenFeb 3, 2022
  122. Ævar Arnfjörð BjarmasonFeb 3, 2022
  123. Elijah NewrenFeb 3, 2022
  124. Ævar Arnfjörð BjarmasonFeb 3, 2022
  125. Emily ShafferFeb 7, 2022
  126. Junio C HamanoFeb 7, 2022
  127. 04/15 merge-tree: implement real mergesElijah Newren via GitGitGadget, Feb 2, 2022
  128. Junio C HamanoFeb 2, 2022
  129. Elijah NewrenFeb 2, 2022
  130. Junio C HamanoFeb 2, 2022
  131. Elijah NewrenFeb 3, 2022
  132. Johannes AltmanningerFeb 3, 2022
  133. Elijah NewrenFeb 3, 2022
  134. Johannes SchindelinFeb 21, 2022
  135. Elijah NewrenFeb 22, 2022
  136. Junio C HamanoFeb 3, 2022
  137. Junio C HamanoFeb 21, 2022
  138. Elijah NewrenFeb 22, 2022
  139. Junio C HamanoFeb 23, 2022
  140. Elijah NewrenFeb 24, 2022
  141. Junio C HamanoFeb 24, 2022
  142. Junio C HamanoFeb 24, 2022
  143. Johannes AltmanningerFeb 27, 2022
  144. Johannes AltmanningerFeb 27, 2022
  145. Johannes SchindelinFeb 22, 2022
  146. Josh SteadmonFeb 4, 2022
  147. Elijah NewrenFeb 4, 2022
  148. 05/15 Introduce a variant of the `warning()` function that takes a `FILE *`Johannes Schindelin via GitGitGadget, Feb 2, 2022
  149. 06/15 diff: allow diff_warn_rename_limit to write somewhere besides stderrJohannes Schindelin via GitGitGadget, Feb 2, 2022
  150. 07/15 merge-ort: split out a separate display_update_messages() functionElijah Newren via GitGitGadget, Feb 2, 2022
  151. 08/15 merge-ort: allow update messages to be written to different file streamElijah Newren via GitGitGadget, Feb 2, 2022
  152. Ævar Arnfjörð BjarmasonFeb 3, 2022
  153. Elijah NewrenFeb 3, 2022
  154. Ævar Arnfjörð BjarmasonFeb 3, 2022
  155. Elijah NewrenFeb 3, 2022
  156. Ævar Arnfjörð BjarmasonFeb 3, 2022
  157. Elijah NewrenFeb 3, 2022
  158. Johannes SchindelinFeb 21, 2022
  159. Elijah NewrenFeb 22, 2022
  160. Johannes SchindelinFeb 22, 2022
  161. 09/15 merge-tree: support including merge messages in outputElijah Newren via GitGitGadget, Feb 2, 2022
  162. 13/15 merge-tree: allow `ls-files -u` style info to be NUL terminatedElijah Newren via GitGitGadget, Feb 2, 2022
  163. 14/15 merge-tree: add a --allow-unrelated-histories flagElijah Newren via GitGitGadget, Feb 2, 2022
  164. 15/15 git-merge-tree.txt: add a section on potentional usage mistakesElijah Newren via GitGitGadget, Feb 2, 2022
  165. 10/15 merge-ort: provide a merge_get_conflicted_files() helper functionElijah Newren via GitGitGadget, Feb 2, 2022
  166. 11/15 merge-tree: provide a list of which files have conflictsElijah Newren via GitGitGadget, Feb 2, 2022
  167. 12/15 merge-tree: provide easy access to `ls-files -u` style infoElijah Newren via GitGitGadget, Feb 2, 2022
  168. Ævar Arnfjörð BjarmasonFeb 2, 2022
  169. Elijah NewrenFeb 3, 2022
  170. 00/12 In-core git merge-tree ("Server side merges")Elijah Newren via GitGitGadget, Feb 12, 2022
  171. 01/12 merge-tree: rename merge_trees() to trivial_merge_trees()Elijah Newren via GitGitGadget, Feb 12, 2022
  172. 02/12 merge-tree: move logic for existing merge into new functionElijah Newren via GitGitGadget, Feb 12, 2022
  173. 03/12 merge-tree: add option parsing and initial shell for real merge functionElijah Newren via GitGitGadget, Feb 12, 2022
  174. 04/12 merge-tree: implement real mergesElijah Newren via GitGitGadget, Feb 12, 2022
  175. Junio C HamanoFeb 14, 2022
  176. Elijah NewrenFeb 15, 2022
  177. Ævar Arnfjörð BjarmasonFeb 15, 2022
  178. 06/12 merge-tree: support including merge messages in outputElijah Newren via GitGitGadget, Feb 12, 2022
  179. 05/12 merge-ort: split out a separate display_update_messages() functionElijah Newren via GitGitGadget, Feb 12, 2022
  180. 07/12 merge-ort: provide a merge_get_conflicted_files() helper functionElijah Newren via GitGitGadget, Feb 12, 2022
  181. 08/12 merge-tree: provide a list of which files have conflictsElijah Newren via GitGitGadget, Feb 12, 2022
  182. 09/12 merge-tree: provide easy access to `ls-files -u` style infoElijah Newren via GitGitGadget, Feb 12, 2022
  183. 12/12 git-merge-tree.txt: add a section on potentional usage mistakesElijah Newren via GitGitGadget, Feb 12, 2022
  184. 10/12 merge-tree: allow `ls-files -u` style info to be NUL terminatedElijah Newren via GitGitGadget, Feb 12, 2022
  185. 11/12 merge-tree: add a --allow-unrelated-histories flagElijah Newren via GitGitGadget, Feb 12, 2022
  186. 00/12 In-core git merge-tree ("Server side merges")Elijah Newren via GitGitGadget, Feb 20, 2022
  187. 01/12 merge-tree: rename merge_trees() to trivial_merge_trees()Elijah Newren via GitGitGadget, Feb 20, 2022
  188. 02/12 merge-tree: move logic for existing merge into new functionElijah Newren via GitGitGadget, Feb 20, 2022
  189. 04/12 merge-tree: implement real mergesElijah Newren via GitGitGadget, Feb 20, 2022
  190. René ScharfeFeb 20, 2022
  191. Johannes SchindelinFeb 21, 2022
  192. Elijah NewrenFeb 22, 2022
  193. Johannes SchindelinFeb 22, 2022
  194. 03/12 merge-tree: add option parsing and initial shell for real merge functionElijah Newren via GitGitGadget, Feb 20, 2022
  195. 05/12 merge-ort: split out a separate display_update_messages() functionElijah Newren via GitGitGadget, Feb 20, 2022
  196. 08/12 merge-tree: provide a list of which files have conflictsElijah Newren via GitGitGadget, Feb 20, 2022
  197. 06/12 merge-tree: support including merge messages in outputElijah Newren via GitGitGadget, Feb 20, 2022
  198. 07/12 merge-ort: provide a merge_get_conflicted_files() helper functionElijah Newren via GitGitGadget, Feb 20, 2022
  199. 11/12 merge-tree: add a --allow-unrelated-histories flagElijah Newren via GitGitGadget, Feb 20, 2022
  200. 12/12 git-merge-tree.txt: add a section on potentional usage mistakesElijah Newren via GitGitGadget, Feb 20, 2022
  201. Johannes SchindelinFeb 22, 2022
  202. 10/12 merge-tree: allow `ls-files -u` style info to be NUL terminatedElijah Newren via GitGitGadget, Feb 20, 2022
  203. 09/12 merge-tree: provide easy access to `ls-files -u` style infoElijah Newren via GitGitGadget, Feb 20, 2022
  204. Ævar Arnfjörð BjarmasonFeb 20, 2022
  205. Johannes SchindelinFeb 21, 2022
  206. Elijah NewrenFeb 22, 2022
  207. Ævar Arnfjörð BjarmasonFeb 22, 2022
  208. 00/12 In-core git merge-tree ("Server side merges")Elijah Newren via GitGitGadget, Feb 23, 2022
  209. 01/12 merge-tree: rename merge_trees() to trivial_merge_trees()Elijah Newren via GitGitGadget, Feb 23, 2022
  210. 02/12 merge-tree: move logic for existing merge into new functionElijah Newren via GitGitGadget, Feb 23, 2022
  211. 03/12 merge-tree: add option parsing and initial shell for real merge functionElijah Newren via GitGitGadget, Feb 23, 2022
  212. 04/12 merge-tree: implement real mergesElijah Newren via GitGitGadget, Feb 23, 2022
  213. 05/12 merge-ort: split out a separate display_update_messages() functionElijah Newren via GitGitGadget, Feb 23, 2022
  214. 07/12 merge-ort: provide a merge_get_conflicted_files() helper functionElijah Newren via GitGitGadget, Feb 23, 2022
  215. 06/12 merge-tree: support including merge messages in outputElijah Newren via GitGitGadget, Feb 23, 2022
  216. 08/12 merge-tree: provide a list of which files have conflictsElijah Newren via GitGitGadget, Feb 23, 2022
  217. 10/12 merge-tree: allow `ls-files -u` style info to be NUL terminatedElijah Newren via GitGitGadget, Feb 23, 2022
  218. 11/12 merge-tree: add a --allow-unrelated-histories flagElijah Newren via GitGitGadget, Feb 23, 2022
  219. 09/12 merge-tree: provide easy access to `ls-files -u` style infoElijah Newren via GitGitGadget, Feb 23, 2022
  220. 12/12 git-merge-tree.txt: add a section on potentional usage mistakesElijah Newren via GitGitGadget, Feb 23, 2022
  221. Junio C HamanoFeb 23, 2022
  222. 00/17 In-core git merge-tree ("Server side merges")Elijah Newren via GitGitGadget, Jun 18, 2022
  223. 01/17 merge-tree: rename merge_trees() to trivial_merge_trees()Elijah Newren via GitGitGadget, Jun 18, 2022
  224. 02/17 merge-tree: move logic for existing merge into new functionElijah Newren via GitGitGadget, Jun 18, 2022
  225. 03/17 merge-tree: add option parsing and initial shell for real merge functionElijah Newren via GitGitGadget, Jun 18, 2022
  226. 05/17 merge-ort: split out a separate display_update_messages() functionElijah Newren via GitGitGadget, Jun 18, 2022
  227. 04/17 merge-tree: implement real mergesElijah Newren via GitGitGadget, Jun 18, 2022
  228. 06/17 merge-tree: support including merge messages in outputElijah Newren via GitGitGadget, Jun 18, 2022
  229. 07/17 merge-ort: provide a merge_get_conflicted_files() helper functionElijah Newren via GitGitGadget, Jun 18, 2022
  230. 09/17 merge-tree: provide a list of which files have conflictsElijah Newren via GitGitGadget, Jun 18, 2022
  231. 08/17 merge-ort: remove command-line-centric submodule message from merge-ortElijah Newren via GitGitGadget, Jun 18, 2022
  232. 12/17 merge-ort: make `path_messages` a strmap to a string_listJohannes Schindelin via GitGitGadget, Jun 18, 2022
  233. 15/17 merge-tree: allow `ls-files -u` style info to be NUL terminatedElijah Newren via GitGitGadget, Jun 18, 2022
  234. 16/17 merge-tree: add a --allow-unrelated-histories flagElijah Newren via GitGitGadget, Jun 18, 2022
  235. 17/17 git-merge-tree.txt: add a section on potentional usage mistakesElijah Newren via GitGitGadget, Jun 18, 2022
  236. 14/17 merge-ort: optionally produce machine-readable outputElijah Newren via GitGitGadget, Jun 18, 2022
  237. 13/17 merge-ort: store more specific conflict informationElijah Newren via GitGitGadget, Jun 18, 2022
  238. 11/17 merge-ort: store messages in a list, not in a single strbufJohannes Schindelin via GitGitGadget, Jun 18, 2022
  239. 10/17 merge-tree: provide easy access to `ls-files -u` style infoElijah Newren via GitGitGadget, Jun 18, 2022
  240. Johannes SchindelinFeb 21, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.