{"thread":{"id":"56206","subject":"[PATCH 00/10] Documentation updates: merge-strategies","startedAt":"2021-08-03T15:35:28Z","lastAt":"2021-08-04T23:51:12Z","messageCount":61,"participants":["Elijah Newren via GitGitGadget","Eric Sunshine","Johannes Schindelin","Elijah Newren","Junio C Hamano","Derrick Stolee","Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":10},"messages":[{"id":"431824","messageId":"pull.1059.git.git.1628004920.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":null,"subject":"[PATCH 00/10] Documentation updates: merge-strategies","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-03T15:35:10Z","receivedAt":"2021-08-03T15:35:28Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"I noticed while updating my switch-default-merge-strategy-to-ort submission,\nthat many of the changes were good documentation updates that we might want\nfor Git v2.33.0. So I pulled those changes out and split them into lots of\nlittle commits so that if any parts need discussion or are objectionable, we\ncan just drop those from this series and apply the rest for v2.33.0.\n\nThe first 9 commits are just small documentation updates, but there is one\ncommit at the end that updates an error message and a code comment.\n\nElijah Newren (10):\n  git-rebase.txt: correct antiquated claims about --rebase-merges\n  directory-rename-detection.txt: small updates due to merge-ort\n    optimizations\n  Documentation: edit awkward references to `git merge-recursive`\n  merge-strategies.txt: update wording for the resolve strategy\n  merge-strategies.txt: do not imply using copy detection is desired\n  merge-strategies.txt: avoid giving special preference to patience\n    algorithm\n  merge-strategies.txt: explain why no-renames might be useful\n  merge-strategies.txt: fix simple capitalization error\n  Documentation: add coverage of the `ort` merge strategy\n  Update error message and code comment\n\n Documentation/git-rebase.txt                  | 29 ++++++----\n Documentation/merge-options.txt               |  4 +-\n Documentation/merge-strategies.txt            | 56 +++++++++++--------\n .../technical/directory-rename-detection.txt  | 14 +++--\n builtin/merge.c                               |  2 +-\n sequencer.c                                   |  2 +-\n 6 files changed, 63 insertions(+), 44 deletions(-)\n\n\nbase-commit: 66262451ec94d30ac4b80eb3123549cf7a788afd\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1059%2Fnewren%2Fort-doc-updates-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1059/newren/ort-doc-updates-v1\nPull-Request: https://github.com/git/git/pull/1059\n-- \ngitgitgadget\n"},{"id":"431825","messageId":"ab2367594a3267a5f8d01cdfdcba576f286e3823.1628004920.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.git.git.1628004920.gitgitgadget@gmail.com","subject":"[PATCH 01/10] git-rebase.txt: correct antiquated claims about --rebase-merges","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-03T15:35:11Z","receivedAt":"2021-08-03T15:35:28Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nWhen --rebase-merges was first introduced, it only worked with the\n`recursive` strategy.  Some time later, it gained support for merges\nusing the `octopus` strategy.  The limitation of only supporting these\ntwo strategies was documented in 25cff9f109 (\"rebase -i --rebase-merges:\nadd a section to the man page\", 2018-04-25) and lifted in e145d99347\n(\"rebase -r: support merge strategies other than `recursive`\",\n2019-07-31).  However, when the limitation was lifted, the documentation\nwas not updated.  Update it now.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/git-rebase.txt | 16 ++++++++++------\n 1 file changed, 10 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 55af6fd24e2..8a67227846a 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -1219,12 +1219,16 @@ successful merge so that the user can edit the message.\n If a `merge` command fails for any reason other than merge conflicts (i.e.\n when the merge operation did not even start), it is rescheduled immediately.\n \n-At this time, the `merge` command will *always* use the `recursive`\n-merge strategy for regular merges, and `octopus` for octopus merges,\n-with no way to choose a different one. To work around\n-this, an `exec` command can be used to call `git merge` explicitly,\n-using the fact that the labels are worktree-local refs (the ref\n-`refs/rewritten/onto` would correspond to the label `onto`, for example).\n+By default, the `merge` command will use the `recursive` merge\n+strategy for regular merges, and `octopus` for octopus merges.  One\n+can specify a default strategy for all merges using the `--strategy`\n+argument when invoking rebase, or can override specific merges in the\n+interactive list of commands by using an `exec` command to call `git\n+merge` explicitly with a `--strategy` argument.  Note that when\n+calling `git merge` explicitly like this, you can make use of the fact\n+that the labels are worktree-local refs (the ref `refs/rewritten/onto`\n+would correspond to the label `onto`, for example) in order to refer\n+to the branches you want to merge.\n \n Note: the first command (`label onto`) labels the revision onto which\n the commits are rebased; The name `onto` is just a convention, as a nod\n-- \ngitgitgadget\n\n"},{"id":"431826","messageId":"6b89ab8d9b1c03ce97fab73f7a2b4261fd90c0c4.1628004920.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.git.git.1628004920.gitgitgadget@gmail.com","subject":"[PATCH 02/10] directory-rename-detection.txt: small updates due to merge-ort optimizations","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-03T15:35:12Z","receivedAt":"2021-08-03T15:35:29Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nIn commit 0c4fd732f0 (\"Move computation of dir_rename_count from\nmerge-ort to diffcore-rename\", 2021-02-27), much of the logic for\ncomputing directory renames moved into diffcore-rename.\ndirectory-rename-detection.txt had claims that all of that logic was\nfound in merge-recursive.  Update the documentation.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n .../technical/directory-rename-detection.txt       | 14 ++++++++------\n 1 file changed, 8 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/technical/directory-rename-detection.txt b/Documentation/technical/directory-rename-detection.txt\nindex 49b83ef3cc4..029ee2cedc5 100644\n--- a/Documentation/technical/directory-rename-detection.txt\n+++ b/Documentation/technical/directory-rename-detection.txt\n@@ -2,9 +2,9 @@ Directory rename detection\n ==========================\n \n Rename detection logic in diffcore-rename that checks for renames of\n-individual files is aggregated and analyzed in merge-recursive for cases\n-where combinations of renames indicate that a full directory has been\n-renamed.\n+individual files is also aggregated there and then analyzed in either\n+merge-ort or merge-recursive for cases where combinations of renames\n+indicate that a full directory has been renamed.\n \n Scope of abilities\n ------------------\n@@ -88,9 +88,11 @@ directory rename detection support in:\n     Folks have requested in the past that `git diff` detect directory\n     renames and somehow simplify its output.  It is not clear whether this\n     would be desirable or how the output should be simplified, so this was\n-    simply not implemented.  Further, to implement this, directory rename\n-    detection logic would need to move from merge-recursive to\n-    diffcore-rename.\n+    simply not implemented.  Also, while diffcore-rename has most of the\n+    logic for detecting directory renames, some of the logic is still found\n+    within merge-ort and merge-recursive.  Fully supporting directory\n+    rename detection in diffs would require copying or moving the remaining\n+    bits of logic to the diff machinery.\n \n   * am\n \n-- \ngitgitgadget\n\n"},{"id":"431827","messageId":"c1d056f0794ddcb0400901228b370b3bb5dfc0da.1628004920.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.git.git.1628004920.gitgitgadget@gmail.com","subject":"[PATCH 03/10] Documentation: edit awkward references to `git merge-recursive`","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-03T15:35:13Z","receivedAt":"2021-08-03T15:35:30Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nA few places in the documentation referred to the \"`recursive` strategy\"\nusing the phrase \"`git merge-recursive`\", suggesting that it was forking\nsubprocesses to call a toplevel builtin.  Perhaps that was relevant to\nwhen rebase was a shell script, but it seems like a rather indirect way\nto refer to the `recursive` strategy.  Simplify the references.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/git-rebase.txt       | 4 ++--\n Documentation/merge-options.txt    | 4 ++--\n Documentation/merge-strategies.txt | 9 +++++----\n 3 files changed, 9 insertions(+), 8 deletions(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 8a67227846a..7044afba362 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -355,8 +355,8 @@ See also INCOMPATIBLE OPTIONS below.\n -s <strategy>::\n --strategy=<strategy>::\n \tUse the given merge strategy.\n-\tIf there is no `-s` option 'git merge-recursive' is used\n-\tinstead.  This implies --merge.\n+\tIf there is no `-s` option the `recursive` strategy is the\n+\tdefault. This implies --merge.\n +\n Because 'git rebase' replays each commit from the working branch\n on top of the <upstream> branch using the given strategy, using\ndiff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt\nindex eb0aabd396f..f819bd8dd68 100644\n--- a/Documentation/merge-options.txt\n+++ b/Documentation/merge-options.txt\n@@ -112,8 +112,8 @@ With --squash, --commit is not allowed, and will fail.\n \tUse the given merge strategy; can be supplied more than\n \tonce to specify them in the order they should be tried.\n \tIf there is no `-s` option, a built-in list of strategies\n-\tis used instead ('git merge-recursive' when merging a single\n-\thead, 'git merge-octopus' otherwise).\n+\tis used instead (`recursive` when merging a single head,\n+\t`octopus` otherwise).\n \n -X <option>::\n --strategy-option=<option>::\ndiff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\nindex 2912de706bf..5d707e952aa 100644\n--- a/Documentation/merge-strategies.txt\n+++ b/Documentation/merge-strategies.txt\n@@ -51,10 +51,11 @@ patience;;\n \tSee also linkgit:git-diff[1] `--patience`.\n \n diff-algorithm=[patience|minimal|histogram|myers];;\n-\tTells 'merge-recursive' to use a different diff algorithm, which\n-\tcan help avoid mismerges that occur due to unimportant matching\n-\tlines (such as braces from distinct functions).  See also\n-\tlinkgit:git-diff[1] `--diff-algorithm`.\n+\tUse a different diff algorithm while merging, which can help\n+\tavoid mismerges that occur due to unimportant matching lines\n+\t(such as braces from distinct functions).  See also\n+\tlinkgit:git-diff[1] `--diff-algorithm`.  Defaults to the\n+\t`diff.algorithm` config setting.\n \n ignore-space-change;;\n ignore-all-space;;\n-- \ngitgitgadget\n\n"},{"id":"431828","messageId":"3989f194ba91e64852285064b652979861445c03.1628004920.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.git.git.1628004920.gitgitgadget@gmail.com","subject":"[PATCH 04/10] merge-strategies.txt: update wording for the resolve strategy","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-03T15:35:14Z","receivedAt":"2021-08-03T15:35:33Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nThe resolve merge strategy was given prominent positioning in this\ndocument, being listed first since it was the default at the time the\ndocument was written.  It hasn't been the default since before Git v1.0\nwas released, though.  Move it later in the document, near `octopus` and\n`ours`.\n\nFurther, the wording for \"resolve\" claimed that it was \"considered\ngenerally safe and fast\", which implies that the other strategies are\nnot.  While such an implication may have been true in 2005 when written,\nit may well be that `ort` is faster today (since it does not need to\nrecurse into all directories).  Also, since `resolve` was the default\nfor less than a year while `recursive` has been the default for a decade\nand a half, I think `recursive` is more battle-tested than `resolve` is.\nJust strike this extraneous phrase.\n\nAlso, provide some quick historical context that may help users\nunderstand its purpose and place in the list of merge strategies.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/merge-strategies.txt | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\nindex 5d707e952aa..6b6017e1cc8 100644\n--- a/Documentation/merge-strategies.txt\n+++ b/Documentation/merge-strategies.txt\n@@ -6,13 +6,6 @@ backend 'merge strategies' to be chosen with `-s` option.  Some strategies\n can also take their own options, which can be passed by giving `-X<option>`\n arguments to `git merge` and/or `git pull`.\n \n-resolve::\n-\tThis can only resolve two heads (i.e. the current branch\n-\tand another branch you pulled from) using a 3-way merge\n-\talgorithm.  It tries to carefully detect criss-cross\n-\tmerge ambiguities and is considered generally safe and\n-\tfast.\n-\n recursive::\n \tThis can only resolve two heads using a 3-way merge\n \talgorithm.  When there is more than one common\n@@ -106,6 +99,13 @@ subtree[=<path>];;\n \tis prefixed (or stripped from the beginning) to make the shape of\n \ttwo trees to match.\n \n+resolve::\n+\tThis can only resolve two heads (i.e. the current branch\n+\tand another branch you pulled from) using a 3-way merge\n+\talgorithm.  It tries to carefully detect criss-cross\n+\tmerge ambiguities.  It cannot handle renames.  This was\n+\tthe default merge algorithm prior to November 2005.\n+\n octopus::\n \tThis resolves cases with more than two heads, but refuses to do\n \ta complex merge that needs manual resolution.  It is\n-- \ngitgitgadget\n\n"},{"id":"431829","messageId":"5f974afe47ce46521f6c51484d1ebd59cd7339dd.1628004920.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.git.git.1628004920.gitgitgadget@gmail.com","subject":"[PATCH 05/10] merge-strategies.txt: do not imply using copy detection is desired","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-03T15:35:15Z","receivedAt":"2021-08-03T15:35:33Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nStating that the recursive strategy \"currently cannot make use of\ndetected copies\" implies that this is a technical shortcoming of the\ncurrent algorithm.  I disagree with that.  I don't see how copies could\npossibly be used in a sane fashion in a merge algorithm -- would we\npropagate changes in one file on one side of history to each copy of\nthat file when merging?  That makes no sense to me.  I cannot think of\nanything else that would make sense either.  Change the wording to\nsimply state that we ignore any copies.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/merge-strategies.txt | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\nindex 6b6017e1cc8..bc82799365a 100644\n--- a/Documentation/merge-strategies.txt\n+++ b/Documentation/merge-strategies.txt\n@@ -16,9 +16,9 @@ recursive::\n \tcausing mismerges by tests done on actual merge commits\n \ttaken from Linux 2.6 kernel development history.\n \tAdditionally this can detect and handle merges involving\n-\trenames, but currently cannot make use of detected\n-\tcopies.  This is the default merge strategy when pulling\n-\tor merging one branch.\n+\trenames.  It does not make use of detected copies.  This\n+\tis the default merge strategy when pulling or merging one\n+\tbranch.\n +\n The 'recursive' strategy can take the following options:\n \n-- \ngitgitgadget\n\n"},{"id":"431830","messageId":"7eecf879d608d8be17d4aa0ae087fb610156019c.1628004920.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.git.git.1628004920.gitgitgadget@gmail.com","subject":"[PATCH 07/10] merge-strategies.txt: explain why no-renames might be useful","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-03T15:35:17Z","receivedAt":"2021-08-03T15:35:35Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/merge-strategies.txt | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\nindex eb43befac7b..d21dbd1e051 100644\n--- a/Documentation/merge-strategies.txt\n+++ b/Documentation/merge-strategies.txt\n@@ -75,9 +75,10 @@ no-renormalize;;\n \t`merge.renormalize` configuration variable.\n \n no-renames;;\n-\tTurn off rename detection. This overrides the `merge.renames`\n-\tconfiguration variable.\n-\tSee also linkgit:git-diff[1] `--no-renames`.\n+\tTurn off rename detection, which can be computationally\n+\texpensive.  This overrides the `merge.renames`\n+\tconfiguration variable.  See also linkgit:git-diff[1]\n+\t`--no-renames`.\n \n find-renames[=<n>];;\n \tTurn on rename detection, optionally setting the similarity\n-- \ngitgitgadget\n\n"},{"id":"431831","messageId":"010702d08417f86da033ae8a6093ec4b9ce6e19a.1628004920.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.git.git.1628004920.gitgitgadget@gmail.com","subject":"[PATCH 08/10] merge-strategies.txt: fix simple capitalization error","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-03T15:35:18Z","receivedAt":"2021-08-03T15:35:36Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/git-rebase.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 7044afba362..b4429954480 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -530,7 +530,7 @@ The `--rebase-merges` mode is similar in spirit to the deprecated\n where commits can be reordered, inserted and dropped at will.\n +\n It is currently only possible to recreate the merge commits using the\n-`recursive` merge strategy; Different merge strategies can be used only via\n+`recursive` merge strategy; different merge strategies can be used only via\n explicit `exec git merge -s <strategy> [...]` commands.\n +\n See also REBASING MERGES and INCOMPATIBLE OPTIONS below.\n-- \ngitgitgadget\n\n"},{"id":"431832","messageId":"6116f4750fd228b96ee293033f867a964b87eb5f.1628004920.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.git.git.1628004920.gitgitgadget@gmail.com","subject":"[PATCH 06/10] merge-strategies.txt: avoid giving special preference to patience algorithm","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-03T15:35:16Z","receivedAt":"2021-08-03T15:35:37Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nWe already have diff-algorithm that explains why there are special diff\nalgorithms, so we do not need to re-explain patience.  patience exists\nas its own toplevel option for historical reasons, but there's no reason\nto give it special preference or document it again and suggest it's more\nimportant than other diff algorithms, so just refer to it as a\ndeprecated shorthand for `diff-algorithm=patience`.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/merge-strategies.txt | 6 +-----\n 1 file changed, 1 insertion(+), 5 deletions(-)\n\ndiff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\nindex bc82799365a..eb43befac7b 100644\n--- a/Documentation/merge-strategies.txt\n+++ b/Documentation/merge-strategies.txt\n@@ -37,11 +37,7 @@ theirs;;\n \tno 'theirs' merge strategy to confuse this merge option with.\n \n patience;;\n-\tWith this option, 'merge-recursive' spends a little extra time\n-\tto avoid mismerges that sometimes occur due to unimportant\n-\tmatching lines (e.g., braces from distinct functions).  Use\n-\tthis when the branches to be merged have diverged wildly.\n-\tSee also linkgit:git-diff[1] `--patience`.\n+\tDeprecated shorthand for diff-algorithm=patience.\n \n diff-algorithm=[patience|minimal|histogram|myers];;\n \tUse a different diff algorithm while merging, which can help\n-- \ngitgitgadget\n\n"},{"id":"431833","messageId":"37a69fd2e0bdb7fba6b6c47c3edec0964165cb61.1628004920.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.git.git.1628004920.gitgitgadget@gmail.com","subject":"[PATCH 09/10] Documentation: add coverage of the `ort` merge strategy","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-03T15:35:19Z","receivedAt":"2021-08-03T15:35:37Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/git-rebase.txt       |  7 ++++---\n Documentation/merge-strategies.txt | 14 ++++++++++++++\n 2 files changed, 18 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex b4429954480..3e112011c6f 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -340,9 +340,10 @@ See also INCOMPATIBLE OPTIONS below.\n \n -m::\n --merge::\n-\tUse merging strategies to rebase.  When the recursive (default) merge\n-\tstrategy is used, this allows rebase to be aware of renames on the\n-\tupstream side.  This is the default.\n+\tUse merging strategies to rebase.  When either the `recursive`\n+\t(default) or `ort` merge strategy is used, this allows rebase\n+\tto be aware of renames on the upstream side.  This is the\n+\tdefault.\n +\n Note that a rebase merge works by replaying each commit from the working\n branch on top of the <upstream> branch.  Because of this, when a merge\ndiff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\nindex d21dbd1e051..d13d4a29875 100644\n--- a/Documentation/merge-strategies.txt\n+++ b/Documentation/merge-strategies.txt\n@@ -96,6 +96,20 @@ subtree[=<path>];;\n \tis prefixed (or stripped from the beginning) to make the shape of\n \ttwo trees to match.\n \n+ort::\n+\tThis is meant as a drop-in replacement for the `recursive`\n+\talgorithm (as reflected in its acronym -- \"Ostensibly\n+\tRecursive's Twin\"), and will likely replace it in the future.\n+\tIt fixes corner cases that the `recursive` strategy handles\n+\tsuboptimally, and is significantly faster in large\n+\trepositories -- especially when many renames are involved.\n++\n+The `ort` strategy takes all the same options as `recursive`.\n+However, it ignores three of those options: `no-renames`,\n+`patience` and `diff-algorithm`.  It always runs with rename\n+detection (it handles it much faster than `recursive` does), and\n+it specifically uses diff-algorithm=histogram.\n+\n resolve::\n \tThis can only resolve two heads (i.e. the current branch\n \tand another branch you pulled from) using a 3-way merge\n-- \ngitgitgadget\n\n"},{"id":"431834","messageId":"2a7169c8c1be425d4234e414c106ad1278aacdd6.1628004920.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.git.git.1628004920.gitgitgadget@gmail.com","subject":"[PATCH 10/10] Update error message and code comment","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-03T15:35:20Z","receivedAt":"2021-08-03T15:35:39Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nThere were two locations in the code that referred to 'merge-recursive'\nbut which were also applicable to 'merge-ort'.  Update them to more\ngeneral wording.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n builtin/merge.c | 2 +-\n sequencer.c     | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex a8a843b1f54..24b62a9c532 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -738,7 +738,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,\n \n \t\tfor (x = 0; x < xopts_nr; x++)\n \t\t\tif (parse_merge_opt(&o, xopts[x]))\n-\t\t\t\tdie(_(\"Unknown option for merge-recursive: -X%s\"), xopts[x]);\n+\t\t\t\tdie(_(\"Unknown strategy option: -X%s\"), xopts[x]);\n \n \t\to.branch1 = head_arg;\n \t\to.branch2 = merge_remote_util(remoteheads->item)->name;\ndiff --git a/sequencer.c b/sequencer.c\nindex 7f07cd00f3f..a4e5c43fcf2 100644\n--- a/sequencer.c\n+++ b/sequencer.c\n@@ -2065,7 +2065,7 @@ static int do_pick_commit(struct repository *r,\n \t\t/*\n \t\t * We do not intend to commit immediately.  We just want to\n \t\t * merge the differences in, so let's compute the tree\n-\t\t * that represents the \"current\" state for merge-recursive\n+\t\t * that represents the \"current\" state for the merge machinery\n \t\t * to work on.\n \t\t */\n \t\tif (write_index_as_tree(&head, r->index, r->index_file, 0, NULL))\n-- \ngitgitgadget\n"},{"id":"431838","messageId":"CAPig+cRrSnrD4jnOOrbqZUbvkxKi0oLH51L0dxC+m9nzDnmf4w@mail.gmail.com","threadId":"56206","inReplyTo":"6116f4750fd228b96ee293033f867a964b87eb5f.1628004920.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 06/10] merge-strategies.txt: avoid giving special preference to patience algorithm","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2021-08-03T17:00:34Z","receivedAt":"2021-08-03T17:01:41Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Aug 3, 2021 at 11:35 AM Elijah Newren via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n> We already have diff-algorithm that explains why there are special diff\n> algorithms, so we do not need to re-explain patience.  patience exists\n> as its own toplevel option for historical reasons, but there's no reason\n> to give it special preference or document it again and suggest it's more\n> important than other diff algorithms, so just refer to it as a\n> deprecated shorthand for `diff-algorithm=patience`.\n>\n> Signed-off-by: Elijah Newren <newren@gmail.com>\n> ---\n> diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\n> @@ -37,11 +37,7 @@ theirs;;\n>  patience;;\n> -       With this option, 'merge-recursive' spends a little extra time\n> -       to avoid mismerges that sometimes occur due to unimportant\n> -       matching lines (e.g., braces from distinct functions).  Use\n> -       this when the branches to be merged have diverged wildly.\n> -       See also linkgit:git-diff[1] `--patience`.\n> +       Deprecated shorthand for diff-algorithm=patience.\n\nProbably want to wrap backticks around `diff-algorithm=patience`. The\nrest of this file seems to be pretty consistent about it. Indeed, the\nexisting deprecation in this file does so:\n\n    rename-threshold=<n>;;\n        Deprecated synonym for `find-renames=<n>`.\n\nMaybe also s/shorthand/synonym/ for consistency with the existing\ndeprecation notice.\n"},{"id":"431895","messageId":"nycvar.QRO.7.76.6.2108040052120.55@tvgsbejvaqbjf.bet","threadId":"56206","inReplyTo":"ab2367594a3267a5f8d01cdfdcba576f286e3823.1628004920.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 01/10] git-rebase.txt: correct antiquated claims about --rebase-merges","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2021-08-03T22:53:09Z","receivedAt":"2021-08-03T22:53:14Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Elijah,\n\nOn Tue, 3 Aug 2021, Elijah Newren via GitGitGadget wrote:\n\n> From: Elijah Newren <newren@gmail.com>\n>\n> When --rebase-merges was first introduced, it only worked with the\n> `recursive` strategy.  Some time later, it gained support for merges\n> using the `octopus` strategy.  The limitation of only supporting these\n> two strategies was documented in 25cff9f109 (\"rebase -i --rebase-merges:\n> add a section to the man page\", 2018-04-25) and lifted in e145d99347\n> (\"rebase -r: support merge strategies other than `recursive`\",\n> 2019-07-31).  However, when the limitation was lifted, the documentation\n> was not updated.  Update it now.\n\nACK!\n\nThank you,\nDscho\n\n>\n> Signed-off-by: Elijah Newren <newren@gmail.com>\n> ---\n>  Documentation/git-rebase.txt | 16 ++++++++++------\n>  1 file changed, 10 insertions(+), 6 deletions(-)\n>\n> diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\n> index 55af6fd24e2..8a67227846a 100644\n> --- a/Documentation/git-rebase.txt\n> +++ b/Documentation/git-rebase.txt\n> @@ -1219,12 +1219,16 @@ successful merge so that the user can edit the message.\n>  If a `merge` command fails for any reason other than merge conflicts (i.e.\n>  when the merge operation did not even start), it is rescheduled immediately.\n>\n> -At this time, the `merge` command will *always* use the `recursive`\n> -merge strategy for regular merges, and `octopus` for octopus merges,\n> -with no way to choose a different one. To work around\n> -this, an `exec` command can be used to call `git merge` explicitly,\n> -using the fact that the labels are worktree-local refs (the ref\n> -`refs/rewritten/onto` would correspond to the label `onto`, for example).\n> +By default, the `merge` command will use the `recursive` merge\n> +strategy for regular merges, and `octopus` for octopus merges.  One\n> +can specify a default strategy for all merges using the `--strategy`\n> +argument when invoking rebase, or can override specific merges in the\n> +interactive list of commands by using an `exec` command to call `git\n> +merge` explicitly with a `--strategy` argument.  Note that when\n> +calling `git merge` explicitly like this, you can make use of the fact\n> +that the labels are worktree-local refs (the ref `refs/rewritten/onto`\n> +would correspond to the label `onto`, for example) in order to refer\n> +to the branches you want to merge.\n>\n>  Note: the first command (`label onto`) labels the revision onto which\n>  the commits are rebased; The name `onto` is just a convention, as a nod\n> --\n> gitgitgadget\n>\n>\n"},{"id":"431896","messageId":"nycvar.QRO.7.76.6.2108040056080.55@tvgsbejvaqbjf.bet","threadId":"56206","inReplyTo":"5f974afe47ce46521f6c51484d1ebd59cd7339dd.1628004920.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 05/10] merge-strategies.txt: do not imply using copy detection is desired","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2021-08-03T22:56:24Z","receivedAt":"2021-08-03T22:56:29Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Elijah,\n\nOn Tue, 3 Aug 2021, Elijah Newren via GitGitGadget wrote:\n\n> From: Elijah Newren <newren@gmail.com>\n>\n> Stating that the recursive strategy \"currently cannot make use of\n> detected copies\" implies that this is a technical shortcoming of the\n> current algorithm.  I disagree with that.  I don't see how copies could\n> possibly be used in a sane fashion in a merge algorithm -- would we\n> propagate changes in one file on one side of history to each copy of\n> that file when merging?  That makes no sense to me.  I cannot think of\n> anything else that would make sense either.  Change the wording to\n> simply state that we ignore any copies.\n\nFWIW I fully agree with this reasoning.\n\nCiao,\nDscho\n\n>\n> Signed-off-by: Elijah Newren <newren@gmail.com>\n> ---\n>  Documentation/merge-strategies.txt | 6 +++---\n>  1 file changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\n> index 6b6017e1cc8..bc82799365a 100644\n> --- a/Documentation/merge-strategies.txt\n> +++ b/Documentation/merge-strategies.txt\n> @@ -16,9 +16,9 @@ recursive::\n>  \tcausing mismerges by tests done on actual merge commits\n>  \ttaken from Linux 2.6 kernel development history.\n>  \tAdditionally this can detect and handle merges involving\n> -\trenames, but currently cannot make use of detected\n> -\tcopies.  This is the default merge strategy when pulling\n> -\tor merging one branch.\n> +\trenames.  It does not make use of detected copies.  This\n> +\tis the default merge strategy when pulling or merging one\n> +\tbranch.\n>  +\n>  The 'recursive' strategy can take the following options:\n>\n> --\n> gitgitgadget\n>\n>\n"},{"id":"431897","messageId":"nycvar.QRO.7.76.6.2108040058520.55@tvgsbejvaqbjf.bet","threadId":"56206","inReplyTo":"010702d08417f86da033ae8a6093ec4b9ce6e19a.1628004920.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 08/10] merge-strategies.txt: fix simple capitalization error","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2021-08-03T23:01:39Z","receivedAt":"2021-08-03T23:01:44Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Elijah,\n\nOn Tue, 3 Aug 2021, Elijah Newren via GitGitGadget wrote:\n\n> From: Elijah Newren <newren@gmail.com>\n>\n> Signed-off-by: Elijah Newren <newren@gmail.com>\n> ---\n>  Documentation/git-rebase.txt | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\n> index 7044afba362..b4429954480 100644\n> --- a/Documentation/git-rebase.txt\n> +++ b/Documentation/git-rebase.txt\n> @@ -530,7 +530,7 @@ The `--rebase-merges` mode is similar in spirit to the deprecated\n>  where commits can be reordered, inserted and dropped at will.\n>  +\n>  It is currently only possible to recreate the merge commits using the\n> -`recursive` merge strategy; Different merge strategies can be used only via\n> +`recursive` merge strategy; different merge strategies can be used only via\n\nI am not a native speaker, so I'm eager to learn what is the correct thing\nto do here. In particular since I continued in lower-case after a\nsemicolon for _years_, right up until some native speaker mentioned that\nthat's only correct if I continue with an incomplete sentence. If a\ncomplete sentence follows the semicolon, so the advice went, I should\nstart the sentence with an upper-case letter.\n\nCould you help me understand the correct rules here?\n\nThanks,\nDscho\n\n>  explicit `exec git merge -s <strategy> [...]` commands.\n>  +\n>  See also REBASING MERGES and INCOMPATIBLE OPTIONS below.\n> --\n> gitgitgadget\n>\n>\n"},{"id":"431898","messageId":"nycvar.QRO.7.76.6.2108040102220.55@tvgsbejvaqbjf.bet","threadId":"56206","inReplyTo":"37a69fd2e0bdb7fba6b6c47c3edec0964165cb61.1628004920.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 09/10] Documentation: add coverage of the `ort` merge strategy","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2021-08-03T23:03:59Z","receivedAt":"2021-08-03T23:04:04Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Elijah,\n\nOn Tue, 3 Aug 2021, Elijah Newren via GitGitGadget wrote:\n\n> From: Elijah Newren <newren@gmail.com>\n>\n> Signed-off-by: Elijah Newren <newren@gmail.com>\n> ---\n>  Documentation/git-rebase.txt       |  7 ++++---\n>  Documentation/merge-strategies.txt | 14 ++++++++++++++\n>  2 files changed, 18 insertions(+), 3 deletions(-)\n>\n> diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\n> index b4429954480..3e112011c6f 100644\n> --- a/Documentation/git-rebase.txt\n> +++ b/Documentation/git-rebase.txt\n> @@ -340,9 +340,10 @@ See also INCOMPATIBLE OPTIONS below.\n>\n>  -m::\n>  --merge::\n> -\tUse merging strategies to rebase.  When the recursive (default) merge\n> -\tstrategy is used, this allows rebase to be aware of renames on the\n> -\tupstream side.  This is the default.\n> +\tUse merging strategies to rebase.  When either the `recursive`\n> +\t(default) or `ort` merge strategy is used, this allows rebase\n> +\tto be aware of renames on the upstream side.  This is the\n> +\tdefault.\n\nSince this now talks about two merge strategies, I think \"This is the\ndefault\" needs to specify which of the two strategies is the default.\n\n>  +\n>  Note that a rebase merge works by replaying each commit from the working\n>  branch on top of the <upstream> branch.  Because of this, when a merge\n> diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\n> index d21dbd1e051..d13d4a29875 100644\n> --- a/Documentation/merge-strategies.txt\n> +++ b/Documentation/merge-strategies.txt\n> @@ -96,6 +96,20 @@ subtree[=<path>];;\n>  \tis prefixed (or stripped from the beginning) to make the shape of\n>  \ttwo trees to match.\n>\n> +ort::\n> +\tThis is meant as a drop-in replacement for the `recursive`\n> +\talgorithm (as reflected in its acronym -- \"Ostensibly\n> +\tRecursive's Twin\"), and will likely replace it in the future.\n> +\tIt fixes corner cases that the `recursive` strategy handles\n> +\tsuboptimally, and is significantly faster in large\n> +\trepositories -- especially when many renames are involved.\n> ++\n> +The `ort` strategy takes all the same options as `recursive`.\n> +However, it ignores three of those options: `no-renames`,\n> +`patience` and `diff-algorithm`.  It always runs with rename\n> +detection (it handles it much faster than `recursive` does), and\n> +it specifically uses diff-algorithm=histogram.\n\nProbably `diff-algorithm=histogram` should also be enclosed within\nbackticks.\n\nThanks,\nDscho\n\n> +\n>  resolve::\n>  \tThis can only resolve two heads (i.e. the current branch\n>  \tand another branch you pulled from) using a 3-way merge\n> --\n> gitgitgadget\n>\n>\n"},{"id":"431899","messageId":"nycvar.QRO.7.76.6.2108040104150.55@tvgsbejvaqbjf.bet","threadId":"56206","inReplyTo":"2a7169c8c1be425d4234e414c106ad1278aacdd6.1628004920.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 10/10] Update error message and code comment","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2021-08-03T23:05:17Z","receivedAt":"2021-08-03T23:05:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Elijah,\n\nOn Tue, 3 Aug 2021, Elijah Newren via GitGitGadget wrote:\n\n> From: Elijah Newren <newren@gmail.com>\n>\n> There were two locations in the code that referred to 'merge-recursive'\n> but which were also applicable to 'merge-ort'.  Update them to more\n> general wording.\n>\n> Signed-off-by: Elijah Newren <newren@gmail.com>\n> ---\n>  builtin/merge.c | 2 +-\n>  sequencer.c     | 2 +-\n>  2 files changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/builtin/merge.c b/builtin/merge.c\n> index a8a843b1f54..24b62a9c532 100644\n> --- a/builtin/merge.c\n> +++ b/builtin/merge.c\n> @@ -738,7 +738,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,\n>\n>  \t\tfor (x = 0; x < xopts_nr; x++)\n>  \t\t\tif (parse_merge_opt(&o, xopts[x]))\n> -\t\t\t\tdie(_(\"Unknown option for merge-recursive: -X%s\"), xopts[x]);\n> +\t\t\t\tdie(_(\"Unknown strategy option: -X%s\"), xopts[x]);\n\nSince we updated our rules to start `die()` messages with a lower-case\nletter, we could sneak in this change here, too. That would save\ntranslators one extra round.\n\nThank you,\nDscho\n\n>\n>  \t\to.branch1 = head_arg;\n>  \t\to.branch2 = merge_remote_util(remoteheads->item)->name;\n> diff --git a/sequencer.c b/sequencer.c\n> index 7f07cd00f3f..a4e5c43fcf2 100644\n> --- a/sequencer.c\n> +++ b/sequencer.c\n> @@ -2065,7 +2065,7 @@ static int do_pick_commit(struct repository *r,\n>  \t\t/*\n>  \t\t * We do not intend to commit immediately.  We just want to\n>  \t\t * merge the differences in, so let's compute the tree\n> -\t\t * that represents the \"current\" state for merge-recursive\n> +\t\t * that represents the \"current\" state for the merge machinery\n>  \t\t * to work on.\n>  \t\t */\n>  \t\tif (write_index_as_tree(&head, r->index, r->index_file, 0, NULL))\n> --\n> gitgitgadget\n>\n"},{"id":"431900","messageId":"nycvar.QRO.7.76.6.2108040105330.55@tvgsbejvaqbjf.bet","threadId":"56206","inReplyTo":"pull.1059.git.git.1628004920.gitgitgadget@gmail.com","subject":"Re: [PATCH 00/10] Documentation updates: merge-strategies","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2021-08-03T23:06:17Z","receivedAt":"2021-08-03T23:06:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Elijah,\n\nOn Tue, 3 Aug 2021, Elijah Newren via GitGitGadget wrote:\n\n> I noticed while updating my switch-default-merge-strategy-to-ort submission,\n> that many of the changes were good documentation updates that we might want\n> for Git v2.33.0. So I pulled those changes out and split them into lots of\n> little commits so that if any parts need discussion or are objectionable, we\n> can just drop those from this series and apply the rest for v2.33.0.\n>\n> The first 9 commits are just small documentation updates, but there is one\n> commit at the end that updates an error message and a code comment.\n\nI looked through them, and they all looked sensible. Hopefully my few\nsuggestions/questions are helpful.\n\nThank you for working on this,\nDscho\n"},{"id":"431901","messageId":"CABPp-BFuHiBGC-JnneJYCUWbX4VAT22wTFh=W2msca9A7Yovjw@mail.gmail.com","threadId":"56206","inReplyTo":"nycvar.QRO.7.76.6.2108040058520.55@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 08/10] merge-strategies.txt: fix simple capitalization error","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2021-08-03T23:32:51Z","receivedAt":"2021-08-03T23:33:03Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Tue, Aug 3, 2021 at 5:01 PM Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n>\n> Hi Elijah,\n>\n> On Tue, 3 Aug 2021, Elijah Newren via GitGitGadget wrote:\n>\n> > From: Elijah Newren <newren@gmail.com>\n> >\n> > Signed-off-by: Elijah Newren <newren@gmail.com>\n> > ---\n> >  Documentation/git-rebase.txt | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> >\n> > diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\n> > index 7044afba362..b4429954480 100644\n> > --- a/Documentation/git-rebase.txt\n> > +++ b/Documentation/git-rebase.txt\n> > @@ -530,7 +530,7 @@ The `--rebase-merges` mode is similar in spirit to the deprecated\n> >  where commits can be reordered, inserted and dropped at will.\n> >  +\n> >  It is currently only possible to recreate the merge commits using the\n> > -`recursive` merge strategy; Different merge strategies can be used only via\n> > +`recursive` merge strategy; different merge strategies can be used only via\n>\n> I am not a native speaker, so I'm eager to learn what is the correct thing\n> to do here. In particular since I continued in lower-case after a\n> semicolon for _years_, right up until some native speaker mentioned that\n> that's only correct if I continue with an incomplete sentence. If a\n> complete sentence follows the semicolon, so the advice went, I should\n> start the sentence with an upper-case letter.\n>\n> Could you help me understand the correct rules here?\n\nFirst I've ever heard of it; I just presumed it was a typo.  I don't\npretend to be an expert on such topics (and although native speakers\nmay have an edge in knowing what \"sounds natural\", I tend to presume\nwe are less likely to know the rules).  However, some quick internet\nsearches suggest that different style guides differ on whether to\nfollow a *colon* with a capital letter[1][2][3], but everything I can\nfind suggests that *semicolons* should always be followed by a\nlowercase letter (with exceptions for proper nouns)[2][4][5][and\nothers...].\n\n[1] http://www.sussex.ac.uk/informatics/punctuation/colonandsemi/colon\n[2] https://www.quora.com/Why-is-capitalization-necessary-after-a-semi-colon\n[3] https://writingcenter.unc.edu/tips-and-tools/semi-colons-colons-and-dashes/\n[4] https://writeanswers.royalroads.ca/faq/199268\n[5] https://wordcounter.net/blog/2016/06/24/101812_capitalize-words-colon-semi-colon.html\n\nSo, after reading through the above links, I'm fairly convinced that\n'different' should be lowercase here.\n"},{"id":"431902","messageId":"CABPp-BHzXWTiFukuibf0JXyBLx=6xDLxLU5Xsyra7sHvULOn_g@mail.gmail.com","threadId":"56206","inReplyTo":"nycvar.QRO.7.76.6.2108040102220.55@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 09/10] Documentation: add coverage of the `ort` merge strategy","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2021-08-03T23:43:36Z","receivedAt":"2021-08-03T23:43:50Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Tue, Aug 3, 2021 at 5:04 PM Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n>\n> Hi Elijah,\n>\n> On Tue, 3 Aug 2021, Elijah Newren via GitGitGadget wrote:\n>\n> > From: Elijah Newren <newren@gmail.com>\n> >\n> > Signed-off-by: Elijah Newren <newren@gmail.com>\n> > ---\n> >  Documentation/git-rebase.txt       |  7 ++++---\n> >  Documentation/merge-strategies.txt | 14 ++++++++++++++\n> >  2 files changed, 18 insertions(+), 3 deletions(-)\n> >\n> > diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\n> > index b4429954480..3e112011c6f 100644\n> > --- a/Documentation/git-rebase.txt\n> > +++ b/Documentation/git-rebase.txt\n> > @@ -340,9 +340,10 @@ See also INCOMPATIBLE OPTIONS below.\n> >\n> >  -m::\n> >  --merge::\n> > -     Use merging strategies to rebase.  When the recursive (default) merge\n> > -     strategy is used, this allows rebase to be aware of renames on the\n> > -     upstream side.  This is the default.\n> > +     Use merging strategies to rebase.  When either the `recursive`\n> > +     (default) or `ort` merge strategy is used, this allows rebase\n> > +     to be aware of renames on the upstream side.  This is the\n> > +     default.\n>\n> Since this now talks about two merge strategies, I think \"This is the\n> default\" needs to specify which of the two strategies is the default.\n\nIt does, but I agree the wording is a bit confusing.  \"This is the\ndefault\" refers to the fact that \"Using merging strategies to rebase\"\nis the default (as opposed to using git-am).  We can then list some of\nthe possible merge strategies and which are the default (which we did\nin the second sentence).  However, diving into a discussion about\nindividual strategies might be out of place here.  It looks like that\nwas originally mentioned because that allowed rebase to handle\nrenames, but git-am -3 gained that ability well over a decade ago via\nfalling back to the merge machinery.  So perhaps we should just\nsimplify this to:\n\n\"\"\"\nUsing merging strategies to rebase (this is the default since Git\nv2.26.0).  Note that there are multiple merge strategies available,\nand specific ones can be picked with the `--strategy` option.\n\"\"\"\n\n>\n> >  +\n> >  Note that a rebase merge works by replaying each commit from the working\n> >  branch on top of the <upstream> branch.  Because of this, when a merge\n> > diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\n> > index d21dbd1e051..d13d4a29875 100644\n> > --- a/Documentation/merge-strategies.txt\n> > +++ b/Documentation/merge-strategies.txt\n> > @@ -96,6 +96,20 @@ subtree[=<path>];;\n> >       is prefixed (or stripped from the beginning) to make the shape of\n> >       two trees to match.\n> >\n> > +ort::\n> > +     This is meant as a drop-in replacement for the `recursive`\n> > +     algorithm (as reflected in its acronym -- \"Ostensibly\n> > +     Recursive's Twin\"), and will likely replace it in the future.\n> > +     It fixes corner cases that the `recursive` strategy handles\n> > +     suboptimally, and is significantly faster in large\n> > +     repositories -- especially when many renames are involved.\n> > ++\n> > +The `ort` strategy takes all the same options as `recursive`.\n> > +However, it ignores three of those options: `no-renames`,\n> > +`patience` and `diff-algorithm`.  It always runs with rename\n> > +detection (it handles it much faster than `recursive` does), and\n> > +it specifically uses diff-algorithm=histogram.\n>\n> Probably `diff-algorithm=histogram` should also be enclosed within\n> backticks.\n\nI'll fix that up.\n"},{"id":"431904","messageId":"CABPp-BG7tRqPo2pz4ab0LNB3pWT0hZ=PpqC1u-MZKU-_LdUvjw@mail.gmail.com","threadId":"56206","inReplyTo":"nycvar.QRO.7.76.6.2108040104150.55@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 10/10] Update error message and code comment","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2021-08-03T23:49:31Z","receivedAt":"2021-08-03T23:49:46Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Tue, Aug 3, 2021 at 5:05 PM Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n>\n> Hi Elijah,\n>\n> On Tue, 3 Aug 2021, Elijah Newren via GitGitGadget wrote:\n>\n> > From: Elijah Newren <newren@gmail.com>\n> >\n> > There were two locations in the code that referred to 'merge-recursive'\n> > but which were also applicable to 'merge-ort'.  Update them to more\n> > general wording.\n> >\n> > Signed-off-by: Elijah Newren <newren@gmail.com>\n> > ---\n> >  builtin/merge.c | 2 +-\n> >  sequencer.c     | 2 +-\n> >  2 files changed, 2 insertions(+), 2 deletions(-)\n> >\n> > diff --git a/builtin/merge.c b/builtin/merge.c\n> > index a8a843b1f54..24b62a9c532 100644\n> > --- a/builtin/merge.c\n> > +++ b/builtin/merge.c\n> > @@ -738,7 +738,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,\n> >\n> >               for (x = 0; x < xopts_nr; x++)\n> >                       if (parse_merge_opt(&o, xopts[x]))\n> > -                             die(_(\"Unknown option for merge-recursive: -X%s\"), xopts[x]);\n> > +                             die(_(\"Unknown strategy option: -X%s\"), xopts[x]);\n>\n> Since we updated our rules to start `die()` messages with a lower-case\n> letter, we could sneak in this change here, too. That would save\n> translators one extra round.\n\nSure, will do.\n"},{"id":"431905","messageId":"xmqqv94mrs2r.fsf@gitster.g","threadId":"56206","inReplyTo":"6b89ab8d9b1c03ce97fab73f7a2b4261fd90c0c4.1628004920.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 02/10] directory-rename-detection.txt: small updates due to merge-ort optimizations","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-08-04T00:06:52Z","receivedAt":"2021-08-04T00:06:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Elijah Newren via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> diff --git a/Documentation/technical/directory-rename-detection.txt b/Documentation/technical/directory-rename-detection.txt\n> index 49b83ef3cc4..029ee2cedc5 100644\n> --- a/Documentation/technical/directory-rename-detection.txt\n> +++ b/Documentation/technical/directory-rename-detection.txt\n> @@ -2,9 +2,9 @@ Directory rename detection\n>  ==========================\n>  \n>  Rename detection logic in diffcore-rename that checks for renames of\n> -individual files is aggregated and analyzed in merge-recursive for cases\n> -where combinations of renames indicate that a full directory has been\n> -renamed.\n> +individual files is also aggregated there and then analyzed in either\n> +merge-ort or merge-recursive for cases where combinations of renames\n> +indicate that a full directory has been renamed.\n>  \n>  Scope of abilities\n>  ------------------\n> @@ -88,9 +88,11 @@ directory rename detection support in:\n>      Folks have requested in the past that `git diff` detect directory\n>      renames and somehow simplify its output.  It is not clear whether this\n>      would be desirable or how the output should be simplified, so this was\n> -    simply not implemented.  Further, to implement this, directory rename\n> -    detection logic would need to move from merge-recursive to\n> -    diffcore-rename.\n> +    simply not implemented.  Also, while diffcore-rename has most of the\n> +    logic for detecting directory renames, some of the logic is still found\n> +    within merge-ort and merge-recursive.  Fully supporting directory\n> +    rename detection in diffs would require copying or moving the remaining\n> +    bits of logic to the diff machinery.\n>  \n>    * am\n\nLooks good.\n"},{"id":"431906","messageId":"xmqqr1farrqg.fsf@gitster.g","threadId":"56206","inReplyTo":"c1d056f0794ddcb0400901228b370b3bb5dfc0da.1628004920.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 03/10] Documentation: edit awkward references to `git merge-recursive`","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-08-04T00:14:15Z","receivedAt":"2021-08-04T00:14:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Elijah Newren via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> @@ -355,8 +355,8 @@ See also INCOMPATIBLE OPTIONS below.\n>  -s <strategy>::\n>  --strategy=<strategy>::\n>  \tUse the given merge strategy.\n> -\tIf there is no `-s` option 'git merge-recursive' is used\n> -\tinstead.  This implies --merge.\n> +\tIf there is no `-s` option the `recursive` strategy is the\n> +\tdefault. This implies --merge.\n\nWe can depart from the original even more to make it shorter and\nmore readable, I think.\n\n    Use the given merge strategy, instead of the default\n    `recursive`.  This implies `--merge`.\n\nBut the above is readable enough already, so I'll queue it as-is.\n\n"},{"id":"431907","messageId":"xmqqmtpyrrhe.fsf@gitster.g","threadId":"56206","inReplyTo":"3989f194ba91e64852285064b652979861445c03.1628004920.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 04/10] merge-strategies.txt: update wording for the resolve strategy","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-08-04T00:19:41Z","receivedAt":"2021-08-04T00:19:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Elijah Newren via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Elijah Newren <newren@gmail.com>\n>\n> The resolve merge strategy was given prominent positioning in this\n> document, being listed first since it was the default at the time the\n> document was written.  It hasn't been the default since before Git v1.0\n> was released, though.  Move it later in the document, near `octopus` and\n> `ours`.\n\nI think it was listed first because it was written first.\n\n> Further, the wording for \"resolve\" claimed that it was \"considered\n> generally safe and fast\", which implies that the other strategies are\n> not.\n\nI do not think it never implied any such thing; it is good to remove\nit, or add the same to all strategies, though.\n\n> diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\n> index 5d707e952aa..6b6017e1cc8 100644\n> --- a/Documentation/merge-strategies.txt\n> +++ b/Documentation/merge-strategies.txt\n> @@ -6,13 +6,6 @@ backend 'merge strategies' to be chosen with `-s` option.  Some strategies\n>  can also take their own options, which can be passed by giving `-X<option>`\n>  arguments to `git merge` and/or `git pull`.\n>  \n> -resolve::\n> -\tThis can only resolve two heads (i.e. the current branch\n> -\tand another branch you pulled from) using a 3-way merge\n> -\talgorithm.  It tries to carefully detect criss-cross\n> -\tmerge ambiguities and is considered generally safe and\n> -\tfast.\n> -\n>  recursive::\n>  \tThis can only resolve two heads using a 3-way merge\n>  \talgorithm.  When there is more than one common\n> @@ -106,6 +99,13 @@ subtree[=<path>];;\n>  \tis prefixed (or stripped from the beginning) to make the shape of\n>  \ttwo trees to match.\n>  \n> +resolve::\n> +\tThis can only resolve two heads (i.e. the current branch\n> +\tand another branch you pulled from) using a 3-way merge\n> +\talgorithm.  It tries to carefully detect criss-cross\n> +\tmerge ambiguities.  It cannot handle renames.  This was\n> +\tthe default merge algorithm prior to November 2005.\n\n\"It does not handle renames\"; it wasn't like we wanted to do so and\ncannot---we didn't want to, didn't think it was worth doing, it was\nnot part of the design objective to do renames, period.\n\nI do not think it is even worth mentioning that it was the default\nin the past.  And I do not think it is worth saying what timeframe\nthe recursive was the default, either.\n\n>  octopus::\n>  \tThis resolves cases with more than two heads, but refuses to do\n>  \ta complex merge that needs manual resolution.  It is\n"},{"id":"431908","messageId":"CABPp-BFYxCZtvvX9-5MiDO-CUd2suY77JdrCiLkmkbeiVk08uQ@mail.gmail.com","threadId":"56206","inReplyTo":"xmqqr1farrqg.fsf@gitster.g","subject":"Re: [PATCH 03/10] Documentation: edit awkward references to `git merge-recursive`","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2021-08-04T00:19:59Z","receivedAt":"2021-08-04T00:20:16Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Tue, Aug 3, 2021 at 6:14 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> \"Elijah Newren via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n> > @@ -355,8 +355,8 @@ See also INCOMPATIBLE OPTIONS below.\n> >  -s <strategy>::\n> >  --strategy=<strategy>::\n> >       Use the given merge strategy.\n> > -     If there is no `-s` option 'git merge-recursive' is used\n> > -     instead.  This implies --merge.\n> > +     If there is no `-s` option the `recursive` strategy is the\n> > +     default. This implies --merge.\n>\n> We can depart from the original even more to make it shorter and\n> more readable, I think.\n>\n>     Use the given merge strategy, instead of the default\n>     `recursive`.  This implies `--merge`.\n>\n> But the above is readable enough already, so I'll queue it as-is.\n\nI'm making multiple tweaks already for Eric and Dscho, so I'll include\nthis in the re-roll.\n"},{"id":"431909","messageId":"xmqqim0mrrf3.fsf@gitster.g","threadId":"56206","inReplyTo":"5f974afe47ce46521f6c51484d1ebd59cd7339dd.1628004920.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 05/10] merge-strategies.txt: do not imply using copy detection is desired","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-08-04T00:21:04Z","receivedAt":"2021-08-04T00:21:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Elijah Newren via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> -\trenames, but currently cannot make use of detected\n> -\tcopies.  This is the default merge strategy when pulling\n> -\tor merging one branch.\n> +\trenames.  It does not make use of detected copies.  This\n> +\tis the default merge strategy when pulling or merging one\n> +\tbranch.\n\nGood use of \"does not\"; we do not and we should not say \"cannot\"\nhere.\n\n"},{"id":"431910","messageId":"xmqqeebarr36.fsf@gitster.g","threadId":"56206","inReplyTo":"7eecf879d608d8be17d4aa0ae087fb610156019c.1628004920.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 07/10] merge-strategies.txt: explain why no-renames might be useful","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-08-04T00:28:13Z","receivedAt":"2021-08-04T00:28:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Elijah Newren via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Elijah Newren <newren@gmail.com>\n>\n> Signed-off-by: Elijah Newren <newren@gmail.com>\n> ---\n>  Documentation/merge-strategies.txt | 7 ++++---\n>  1 file changed, 4 insertions(+), 3 deletions(-)\n>\n> diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\n> index eb43befac7b..d21dbd1e051 100644\n> --- a/Documentation/merge-strategies.txt\n> +++ b/Documentation/merge-strategies.txt\n> @@ -75,9 +75,10 @@ no-renormalize;;\n>  \t`merge.renormalize` configuration variable.\n>  \n>  no-renames;;\n> -\tTurn off rename detection. This overrides the `merge.renames`\n> -\tconfiguration variable.\n> -\tSee also linkgit:git-diff[1] `--no-renames`.\n> +\tTurn off rename detection, which can be computationally\n> +\texpensive.  This overrides the `merge.renames`\n> +\tconfiguration variable.  See also linkgit:git-diff[1]\n> +\t`--no-renames`.\n\nOther reasons are that we may find a pair that the user did not\nintend to when they made the change (i.e. it was done purely a\ncreation and a deletion but we found similarity), or we may find a\nwrong original to consolidate changes from a side branch into, and\nthese are fundamental as it is our early design choice not to\nrecord renames at the time of committing.\n"},{"id":"431911","messageId":"xmqq8s1irqu9.fsf@gitster.g","threadId":"56206","inReplyTo":"37a69fd2e0bdb7fba6b6c47c3edec0964165cb61.1628004920.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 09/10] Documentation: add coverage of the `ort` merge strategy","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-08-04T00:33:34Z","receivedAt":"2021-08-04T00:33:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Elijah Newren via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n>  --merge::\n> -\tUse merging strategies to rebase.  When the recursive (default) merge\n> -\tstrategy is used, this allows rebase to be aware of renames on the\n> -\tupstream side.  This is the default.\n> +\tUse merging strategies to rebase.  When either the `recursive`\n> +\t(default) or `ort` merge strategy is used, this allows rebase\n> +\tto be aware of renames on the upstream side.  This is the\n> +\tdefault.\n\nThe \"this is the default\" at the end is about --merge vs format-patch|am,\nso it should come near \"Use merging strategies to rebase\".\n\n    Use merging strategies to rebase (default).  Renames on the\n    upstream side is taken into account when the `recursive`\n    (default) or `ort` merge strategy is used.\n"},{"id":"431912","messageId":"CABPp-BErWux0inUR_FonzVwX0eKxGrjAofo+GYjMNE4FV0qwsQ@mail.gmail.com","threadId":"56206","inReplyTo":"xmqqmtpyrrhe.fsf@gitster.g","subject":"Re: [PATCH 04/10] merge-strategies.txt: update wording for the resolve strategy","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2021-08-04T00:37:11Z","receivedAt":"2021-08-04T00:37:25Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Tue, Aug 3, 2021 at 6:19 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> \"Elijah Newren via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n> > From: Elijah Newren <newren@gmail.com>\n> >\n> > The resolve merge strategy was given prominent positioning in this\n> > document, being listed first since it was the default at the time the\n> > document was written.  It hasn't been the default since before Git v1.0\n> > was released, though.  Move it later in the document, near `octopus` and\n> > `ours`.\n>\n> I think it was listed first because it was written first.\n\nDo you want it to be kept first for that reason as well?  I thought it\nmade more sense to cover the default strategy first, but I can move it\nback if you prefer historical implementation order.\n\n> > Further, the wording for \"resolve\" claimed that it was \"considered\n> > generally safe and fast\", which implies that the other strategies are\n> > not.\n>\n> I do not think it never implied any such thing; it is good to remove\n> it, or add the same to all strategies, though.\n\nI am unsure if your double negatives are intentional\n(not..never)...but I think you're saying it's okay to remove this\ntext.\n\n> > diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\n> > index 5d707e952aa..6b6017e1cc8 100644\n> > --- a/Documentation/merge-strategies.txt\n> > +++ b/Documentation/merge-strategies.txt\n> > @@ -6,13 +6,6 @@ backend 'merge strategies' to be chosen with `-s` option.  Some strategies\n> >  can also take their own options, which can be passed by giving `-X<option>`\n> >  arguments to `git merge` and/or `git pull`.\n> >\n> > -resolve::\n> > -     This can only resolve two heads (i.e. the current branch\n> > -     and another branch you pulled from) using a 3-way merge\n> > -     algorithm.  It tries to carefully detect criss-cross\n> > -     merge ambiguities and is considered generally safe and\n> > -     fast.\n> > -\n> >  recursive::\n> >       This can only resolve two heads using a 3-way merge\n> >       algorithm.  When there is more than one common\n> > @@ -106,6 +99,13 @@ subtree[=<path>];;\n> >       is prefixed (or stripped from the beginning) to make the shape of\n> >       two trees to match.\n> >\n> > +resolve::\n> > +     This can only resolve two heads (i.e. the current branch\n> > +     and another branch you pulled from) using a 3-way merge\n> > +     algorithm.  It tries to carefully detect criss-cross\n> > +     merge ambiguities.  It cannot handle renames.  This was\n> > +     the default merge algorithm prior to November 2005.\n>\n> \"It does not handle renames\"; it wasn't like we wanted to do so and\n> cannot---we didn't want to, didn't think it was worth doing, it was\n> not part of the design objective to do renames, period.\n\nRight, sorry for the poor wording.  I'll fix it to use your phrase.\n\n> I do not think it is even worth mentioning that it was the default\n> in the past.  And I do not think it is worth saying what timeframe\n> the recursive was the default, either.\n\nI don't feel strongly about it and I can strike it.  My reasoning was\nthat providing historical timeframes might help them repeat or\nrecreate old merges in their own repositories.\n\nHowever, I agree that the more likely bits of information that will\nhelp users select the strategy they want are the capabilities (e.g.\nrenames, criss-cross merges, number of heads, etc.).\n"},{"id":"431914","messageId":"CABPp-BG_Ubg9-5PXXytRuCijDTgJbTab+e09YkzP20HiybZGqg@mail.gmail.com","threadId":"56206","inReplyTo":"xmqq8s1irqu9.fsf@gitster.g","subject":"Re: [PATCH 09/10] Documentation: add coverage of the `ort` merge strategy","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2021-08-04T00:39:30Z","receivedAt":"2021-08-04T00:39:45Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Tue, Aug 3, 2021 at 6:33 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> \"Elijah Newren via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n> >  --merge::\n> > -     Use merging strategies to rebase.  When the recursive (default) merge\n> > -     strategy is used, this allows rebase to be aware of renames on the\n> > -     upstream side.  This is the default.\n> > +     Use merging strategies to rebase.  When either the `recursive`\n> > +     (default) or `ort` merge strategy is used, this allows rebase\n> > +     to be aware of renames on the upstream side.  This is the\n> > +     default.\n>\n> The \"this is the default\" at the end is about --merge vs format-patch|am,\n> so it should come near \"Use merging strategies to rebase\".\n>\n>     Use merging strategies to rebase (default).  Renames on the\n>     upstream side is taken into account when the `recursive`\n>     (default) or `ort` merge strategy is used.\n\nWe can simplify this to just:\n\n    Use merging strategies to rebase (default).\n\nbecause when git-am -3 was switched from `resolve` to `recursive` in\nDec 2006, it too gained the ability to handle renames and made the\nrest of this description for --merge obsolete.\n"},{"id":"431915","messageId":"CABPp-BGKbV7WPKmMdzetXgzaqzzaGGQ6SRuKHENkQh98-huotw@mail.gmail.com","threadId":"56206","inReplyTo":"xmqqeebarr36.fsf@gitster.g","subject":"Re: [PATCH 07/10] merge-strategies.txt: explain why no-renames might be useful","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2021-08-04T00:44:27Z","receivedAt":"2021-08-04T00:44:41Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Tue, Aug 3, 2021 at 6:28 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> \"Elijah Newren via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n> > From: Elijah Newren <newren@gmail.com>\n> >\n> > Signed-off-by: Elijah Newren <newren@gmail.com>\n> > ---\n> >  Documentation/merge-strategies.txt | 7 ++++---\n> >  1 file changed, 4 insertions(+), 3 deletions(-)\n> >\n> > diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\n> > index eb43befac7b..d21dbd1e051 100644\n> > --- a/Documentation/merge-strategies.txt\n> > +++ b/Documentation/merge-strategies.txt\n> > @@ -75,9 +75,10 @@ no-renormalize;;\n> >       `merge.renormalize` configuration variable.\n> >\n> >  no-renames;;\n> > -     Turn off rename detection. This overrides the `merge.renames`\n> > -     configuration variable.\n> > -     See also linkgit:git-diff[1] `--no-renames`.\n> > +     Turn off rename detection, which can be computationally\n> > +     expensive.  This overrides the `merge.renames`\n> > +     configuration variable.  See also linkgit:git-diff[1]\n> > +     `--no-renames`.\n>\n> Other reasons are that we may find a pair that the user did not\n> intend to when they made the change (i.e. it was done purely a\n> creation and a deletion but we found similarity), or we may find a\n> wrong original to consolidate changes from a side branch into, and\n> these are fundamental as it is our early design choice not to\n> record renames at the time of committing.\n\nGood points.  Trying to describe all of that makes it somewhat\nlengthy; does it make sense to include all of that, or should I just\ndrop this patch?\n"},{"id":"431921","messageId":"xmqqv94mq87g.fsf@gitster.g","threadId":"56206","inReplyTo":"CABPp-BErWux0inUR_FonzVwX0eKxGrjAofo+GYjMNE4FV0qwsQ@mail.gmail.com","subject":"Re: [PATCH 04/10] merge-strategies.txt: update wording for the resolve strategy","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-08-04T02:01:23Z","receivedAt":"2021-08-04T02:01:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Elijah Newren <newren@gmail.com> writes:\n\n> On Tue, Aug 3, 2021 at 6:19 PM Junio C Hamano <gitster@pobox.com> wrote:\n>>\n>> \"Elijah Newren via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>>\n>> > From: Elijah Newren <newren@gmail.com>\n>> >\n>> > The resolve merge strategy was given prominent positioning in this\n>> > document, being listed first since it was the default at the time the\n>> > document was written.  It hasn't been the default since before Git v1.0\n>> > was released, though.  Move it later in the document, near `octopus` and\n>> > `ours`.\n>>\n>> I think it was listed first because it was written first.\n>\n> Do you want it to be kept first for that reason as well?  I thought it\n> made more sense to cover the default strategy first, but I can move it\n> back if you prefer historical implementation order.\n\nNo, I was only correcting the guess described in the log message.\n\n> I am unsure if your double negatives are intentional\n> (not..never)...but I think you're saying it's okay to remove this\n> text.\n\nYes.\n"},{"id":"431922","messageId":"xmqqr1faq80e.fsf@gitster.g","threadId":"56206","inReplyTo":"CABPp-BGKbV7WPKmMdzetXgzaqzzaGGQ6SRuKHENkQh98-huotw@mail.gmail.com","subject":"Re: [PATCH 07/10] merge-strategies.txt: explain why no-renames might be useful","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-08-04T02:05:37Z","receivedAt":"2021-08-04T02:05:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Elijah Newren <newren@gmail.com> writes:\n\n>> >  no-renames;;\n>> > -     Turn off rename detection. This overrides the `merge.renames`\n>> > -     configuration variable.\n>> > -     See also linkgit:git-diff[1] `--no-renames`.\n>> > +     Turn off rename detection, which can be computationally\n>> > +     expensive.  This overrides the `merge.renames`\n>> > +     configuration variable.  See also linkgit:git-diff[1]\n>> > +     `--no-renames`.\n>>\n>> Other reasons are that we may find a pair that the user did not\n>> intend to when they made the change (i.e. it was done purely a\n>> creation and a deletion but we found similarity), or we may find a\n>> wrong original to consolidate changes from a side branch into, and\n>> these are fundamental as it is our early design choice not to\n>> record renames at the time of committing.\n>\n> Good points.  Trying to describe all of that makes it somewhat\n> lengthy; does it make sense to include all of that, or should I just\n> drop this patch?\n\nWhat do the git-diff page say?  If it is not worth saying there,\nperhaps we should not have to do so here, either.\n\nWe should have _somewhere_ that lists these pitfalls that the users\nmay want to be aware of, that is common to all the features that\nends up using and relying on the rename machinery.  I do not think\nmerge strategies documentation is the place.\n\n\n"},{"id":"431924","messageId":"pull.1059.v2.git.git.1628054935.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.git.git.1628004920.gitgitgadget@gmail.com","subject":"[PATCH v2 00/10] Documentation updates: merge-strategies","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T05:28:45Z","receivedAt":"2021-08-04T05:29:02Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"I noticed while updating my switch-default-merge-strategy-to-ort submission,\nthat many of the changes were good documentation updates that we might want\nfor Git v2.33.0. So I pulled those changes out and split them into lots of\nlittle commits so that if any parts need discussion or are objectionable, we\ncan just drop those from this series and apply the rest for v2.33.0.\n\nThe first 9 commits are just small documentation updates, but there is one\ncommit at the end that updates an error message and a code comment.\n\nChanges since v1:\n\n * Multiple tweaks suggested by Eric, Dscho, and Junio\n * Removed patch 7 explaining no-renames since that probably belongs in git\n   diff --no-renames instead, and this series is about merge-strategies.\n * Inserted a new patch 8 that strikes some misleading or at least\n   no-longer-important text from git-rebase.txt (due changes back in late\n   2006).\n\nElijah Newren (10):\n  git-rebase.txt: correct antiquated claims about --rebase-merges\n  directory-rename-detection.txt: small updates due to merge-ort\n    optimizations\n  Documentation: edit awkward references to `git merge-recursive`\n  merge-strategies.txt: update wording for the resolve strategy\n  merge-strategies.txt: do not imply using copy detection is desired\n  merge-strategies.txt: avoid giving special preference to patience\n    algorithm\n  merge-strategies.txt: fix simple capitalization error\n  git-rebase.txt: correct out-of-date and misleading text about renames\n  merge-strategies.txt: add coverage of the `ort` merge strategy\n  Update error message and code comment\n\n Documentation/git-rebase.txt                  | 27 ++++++-----\n Documentation/merge-options.txt               |  4 +-\n Documentation/merge-strategies.txt            | 48 +++++++++++--------\n .../technical/directory-rename-detection.txt  | 14 +++---\n builtin/merge.c                               |  2 +-\n sequencer.c                                   |  2 +-\n 6 files changed, 55 insertions(+), 42 deletions(-)\n\n\nbase-commit: 66262451ec94d30ac4b80eb3123549cf7a788afd\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1059%2Fnewren%2Fort-doc-updates-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1059/newren/ort-doc-updates-v2\nPull-Request: https://github.com/git/git/pull/1059\n\nRange-diff vs v1:\n\n  1:  ab2367594a3 !  1:  34352397168 git-rebase.txt: correct antiquated claims about --rebase-merges\n     @@ Commit message\n          2019-07-31).  However, when the limitation was lifted, the documentation\n          was not updated.  Update it now.\n      \n     +    Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n          Signed-off-by: Elijah Newren <newren@gmail.com>\n      \n       ## Documentation/git-rebase.txt ##\n  2:  6b89ab8d9b1 =  2:  3fdd068231a directory-rename-detection.txt: small updates due to merge-ort optimizations\n  3:  c1d056f0794 !  3:  2a38320c2be Documentation: edit awkward references to `git merge-recursive`\n     @@ Commit message\n      \n       ## Documentation/git-rebase.txt ##\n      @@ Documentation/git-rebase.txt: See also INCOMPATIBLE OPTIONS below.\n     + \n       -s <strategy>::\n       --strategy=<strategy>::\n     - \tUse the given merge strategy.\n     +-\tUse the given merge strategy.\n      -\tIf there is no `-s` option 'git merge-recursive' is used\n      -\tinstead.  This implies --merge.\n     -+\tIf there is no `-s` option the `recursive` strategy is the\n     -+\tdefault. This implies --merge.\n     ++\tUse the given merge strategy, instead of the default\n     ++\t`recursive`.  This implies `--merge`.\n       +\n       Because 'git rebase' replays each commit from the working branch\n       on top of the <upstream> branch using the given strategy, using\n  4:  3989f194ba9 !  4:  e422a1bc7d4 merge-strategies.txt: update wording for the resolve strategy\n     @@ Metadata\n       ## Commit message ##\n          merge-strategies.txt: update wording for the resolve strategy\n      \n     -    The resolve merge strategy was given prominent positioning in this\n     -    document, being listed first since it was the default at the time the\n     -    document was written.  It hasn't been the default since before Git v1.0\n     -    was released, though.  Move it later in the document, near `octopus` and\n     -    `ours`.\n     +    It is probably helpful to cover the default merge strategy first, so\n     +    move the text for the resolve strategy to later in the document.\n      \n          Further, the wording for \"resolve\" claimed that it was \"considered\n     -    generally safe and fast\", which implies that the other strategies are\n     -    not.  While such an implication may have been true in 2005 when written,\n     -    it may well be that `ort` is faster today (since it does not need to\n     -    recurse into all directories).  Also, since `resolve` was the default\n     -    for less than a year while `recursive` has been the default for a decade\n     -    and a half, I think `recursive` is more battle-tested than `resolve` is.\n     -    Just strike this extraneous phrase.\n     -\n     -    Also, provide some quick historical context that may help users\n     -    understand its purpose and place in the list of merge strategies.\n     +    generally safe and fast\", which might imply in some readers minds that\n     +    the same is not true of other strategies.  Rather than adding this text\n     +    to all the strategies, just remove it from this one.\n      \n          Signed-off-by: Elijah Newren <newren@gmail.com>\n      \n     @@ Documentation/merge-strategies.txt: subtree[=<path>];;\n      +\tThis can only resolve two heads (i.e. the current branch\n      +\tand another branch you pulled from) using a 3-way merge\n      +\talgorithm.  It tries to carefully detect criss-cross\n     -+\tmerge ambiguities.  It cannot handle renames.  This was\n     -+\tthe default merge algorithm prior to November 2005.\n     ++\tmerge ambiguities.  It does not handle renames.\n      +\n       octopus::\n       \tThis resolves cases with more than two heads, but refuses to do\n  5:  5f974afe47c =  5:  b1db5fdebe5 merge-strategies.txt: do not imply using copy detection is desired\n  6:  6116f4750fd !  6:  44101062e0e merge-strategies.txt: avoid giving special preference to patience algorithm\n     @@ Documentation/merge-strategies.txt: theirs;;\n      -\tmatching lines (e.g., braces from distinct functions).  Use\n      -\tthis when the branches to be merged have diverged wildly.\n      -\tSee also linkgit:git-diff[1] `--patience`.\n     -+\tDeprecated shorthand for diff-algorithm=patience.\n     ++\tDeprecated synonym for `diff-algorithm=patience`.\n       \n       diff-algorithm=[patience|minimal|histogram|myers];;\n       \tUse a different diff algorithm while merging, which can help\n  7:  7eecf879d60 <  -:  ----------- merge-strategies.txt: explain why no-renames might be useful\n  8:  010702d0841 =  7:  d1521f98dee merge-strategies.txt: fix simple capitalization error\n  -:  ----------- >  8:  8978132397e git-rebase.txt: correct out-of-date and misleading text about renames\n  9:  37a69fd2e0b !  9:  bc92826f7e5 Documentation: add coverage of the `ort` merge strategy\n     @@ Metadata\n      Author: Elijah Newren <newren@gmail.com>\n      \n       ## Commit message ##\n     -    Documentation: add coverage of the `ort` merge strategy\n     +    merge-strategies.txt: add coverage of the `ort` merge strategy\n      \n          Signed-off-by: Elijah Newren <newren@gmail.com>\n      \n     - ## Documentation/git-rebase.txt ##\n     -@@ Documentation/git-rebase.txt: See also INCOMPATIBLE OPTIONS below.\n     - \n     - -m::\n     - --merge::\n     --\tUse merging strategies to rebase.  When the recursive (default) merge\n     --\tstrategy is used, this allows rebase to be aware of renames on the\n     --\tupstream side.  This is the default.\n     -+\tUse merging strategies to rebase.  When either the `recursive`\n     -+\t(default) or `ort` merge strategy is used, this allows rebase\n     -+\tto be aware of renames on the upstream side.  This is the\n     -+\tdefault.\n     - +\n     - Note that a rebase merge works by replaying each commit from the working\n     - branch on top of the <upstream> branch.  Because of this, when a merge\n     -\n       ## Documentation/merge-strategies.txt ##\n      @@ Documentation/merge-strategies.txt: subtree[=<path>];;\n       \tis prefixed (or stripped from the beginning) to make the shape of\n     @@ Documentation/merge-strategies.txt: subtree[=<path>];;\n      +However, it ignores three of those options: `no-renames`,\n      +`patience` and `diff-algorithm`.  It always runs with rename\n      +detection (it handles it much faster than `recursive` does), and\n     -+it specifically uses diff-algorithm=histogram.\n     ++it specifically uses `diff-algorithm=histogram`.\n      +\n       resolve::\n       \tThis can only resolve two heads (i.e. the current branch\n 10:  2a7169c8c1b ! 10:  4a78ac53424 Update error message and code comment\n     @@ builtin/merge.c: static int try_merge_strategy(const char *strategy, struct comm\n       \t\tfor (x = 0; x < xopts_nr; x++)\n       \t\t\tif (parse_merge_opt(&o, xopts[x]))\n      -\t\t\t\tdie(_(\"Unknown option for merge-recursive: -X%s\"), xopts[x]);\n     -+\t\t\t\tdie(_(\"Unknown strategy option: -X%s\"), xopts[x]);\n     ++\t\t\t\tdie(_(\"unknown strategy option: -X%s\"), xopts[x]);\n       \n       \t\to.branch1 = head_arg;\n       \t\to.branch2 = merge_remote_util(remoteheads->item)->name;\n\n-- \ngitgitgadget\n"},{"id":"431925","messageId":"3435239716822c0ce01232d06bc9f0170fb2f946.1628054936.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v2.git.git.1628054935.gitgitgadget@gmail.com","subject":"[PATCH v2 01/10] git-rebase.txt: correct antiquated claims about --rebase-merges","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T05:28:46Z","receivedAt":"2021-08-04T05:29:03Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nWhen --rebase-merges was first introduced, it only worked with the\n`recursive` strategy.  Some time later, it gained support for merges\nusing the `octopus` strategy.  The limitation of only supporting these\ntwo strategies was documented in 25cff9f109 (\"rebase -i --rebase-merges:\nadd a section to the man page\", 2018-04-25) and lifted in e145d99347\n(\"rebase -r: support merge strategies other than `recursive`\",\n2019-07-31).  However, when the limitation was lifted, the documentation\nwas not updated.  Update it now.\n\nAcked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/git-rebase.txt | 16 ++++++++++------\n 1 file changed, 10 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 55af6fd24e2..8a67227846a 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -1219,12 +1219,16 @@ successful merge so that the user can edit the message.\n If a `merge` command fails for any reason other than merge conflicts (i.e.\n when the merge operation did not even start), it is rescheduled immediately.\n \n-At this time, the `merge` command will *always* use the `recursive`\n-merge strategy for regular merges, and `octopus` for octopus merges,\n-with no way to choose a different one. To work around\n-this, an `exec` command can be used to call `git merge` explicitly,\n-using the fact that the labels are worktree-local refs (the ref\n-`refs/rewritten/onto` would correspond to the label `onto`, for example).\n+By default, the `merge` command will use the `recursive` merge\n+strategy for regular merges, and `octopus` for octopus merges.  One\n+can specify a default strategy for all merges using the `--strategy`\n+argument when invoking rebase, or can override specific merges in the\n+interactive list of commands by using an `exec` command to call `git\n+merge` explicitly with a `--strategy` argument.  Note that when\n+calling `git merge` explicitly like this, you can make use of the fact\n+that the labels are worktree-local refs (the ref `refs/rewritten/onto`\n+would correspond to the label `onto`, for example) in order to refer\n+to the branches you want to merge.\n \n Note: the first command (`label onto`) labels the revision onto which\n the commits are rebased; The name `onto` is just a convention, as a nod\n-- \ngitgitgadget\n\n"},{"id":"431926","messageId":"3fdd068231a22375f979212189dfdffd4a2e4660.1628054936.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v2.git.git.1628054935.gitgitgadget@gmail.com","subject":"[PATCH v2 02/10] directory-rename-detection.txt: small updates due to merge-ort optimizations","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T05:28:47Z","receivedAt":"2021-08-04T05:29:06Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nIn commit 0c4fd732f0 (\"Move computation of dir_rename_count from\nmerge-ort to diffcore-rename\", 2021-02-27), much of the logic for\ncomputing directory renames moved into diffcore-rename.\ndirectory-rename-detection.txt had claims that all of that logic was\nfound in merge-recursive.  Update the documentation.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n .../technical/directory-rename-detection.txt       | 14 ++++++++------\n 1 file changed, 8 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/technical/directory-rename-detection.txt b/Documentation/technical/directory-rename-detection.txt\nindex 49b83ef3cc4..029ee2cedc5 100644\n--- a/Documentation/technical/directory-rename-detection.txt\n+++ b/Documentation/technical/directory-rename-detection.txt\n@@ -2,9 +2,9 @@ Directory rename detection\n ==========================\n \n Rename detection logic in diffcore-rename that checks for renames of\n-individual files is aggregated and analyzed in merge-recursive for cases\n-where combinations of renames indicate that a full directory has been\n-renamed.\n+individual files is also aggregated there and then analyzed in either\n+merge-ort or merge-recursive for cases where combinations of renames\n+indicate that a full directory has been renamed.\n \n Scope of abilities\n ------------------\n@@ -88,9 +88,11 @@ directory rename detection support in:\n     Folks have requested in the past that `git diff` detect directory\n     renames and somehow simplify its output.  It is not clear whether this\n     would be desirable or how the output should be simplified, so this was\n-    simply not implemented.  Further, to implement this, directory rename\n-    detection logic would need to move from merge-recursive to\n-    diffcore-rename.\n+    simply not implemented.  Also, while diffcore-rename has most of the\n+    logic for detecting directory renames, some of the logic is still found\n+    within merge-ort and merge-recursive.  Fully supporting directory\n+    rename detection in diffs would require copying or moving the remaining\n+    bits of logic to the diff machinery.\n \n   * am\n \n-- \ngitgitgadget\n\n"},{"id":"431927","messageId":"2a38320c2be2fb859bead9f54e396b4e97020f32.1628054936.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v2.git.git.1628054935.gitgitgadget@gmail.com","subject":"[PATCH v2 03/10] Documentation: edit awkward references to `git merge-recursive`","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T05:28:48Z","receivedAt":"2021-08-04T05:29:08Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nA few places in the documentation referred to the \"`recursive` strategy\"\nusing the phrase \"`git merge-recursive`\", suggesting that it was forking\nsubprocesses to call a toplevel builtin.  Perhaps that was relevant to\nwhen rebase was a shell script, but it seems like a rather indirect way\nto refer to the `recursive` strategy.  Simplify the references.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/git-rebase.txt       | 5 ++---\n Documentation/merge-options.txt    | 4 ++--\n Documentation/merge-strategies.txt | 9 +++++----\n 3 files changed, 9 insertions(+), 9 deletions(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 8a67227846a..c3edcb07e3e 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -354,9 +354,8 @@ See also INCOMPATIBLE OPTIONS below.\n \n -s <strategy>::\n --strategy=<strategy>::\n-\tUse the given merge strategy.\n-\tIf there is no `-s` option 'git merge-recursive' is used\n-\tinstead.  This implies --merge.\n+\tUse the given merge strategy, instead of the default\n+\t`recursive`.  This implies `--merge`.\n +\n Because 'git rebase' replays each commit from the working branch\n on top of the <upstream> branch using the given strategy, using\ndiff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt\nindex eb0aabd396f..f819bd8dd68 100644\n--- a/Documentation/merge-options.txt\n+++ b/Documentation/merge-options.txt\n@@ -112,8 +112,8 @@ With --squash, --commit is not allowed, and will fail.\n \tUse the given merge strategy; can be supplied more than\n \tonce to specify them in the order they should be tried.\n \tIf there is no `-s` option, a built-in list of strategies\n-\tis used instead ('git merge-recursive' when merging a single\n-\thead, 'git merge-octopus' otherwise).\n+\tis used instead (`recursive` when merging a single head,\n+\t`octopus` otherwise).\n \n -X <option>::\n --strategy-option=<option>::\ndiff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\nindex 2912de706bf..5d707e952aa 100644\n--- a/Documentation/merge-strategies.txt\n+++ b/Documentation/merge-strategies.txt\n@@ -51,10 +51,11 @@ patience;;\n \tSee also linkgit:git-diff[1] `--patience`.\n \n diff-algorithm=[patience|minimal|histogram|myers];;\n-\tTells 'merge-recursive' to use a different diff algorithm, which\n-\tcan help avoid mismerges that occur due to unimportant matching\n-\tlines (such as braces from distinct functions).  See also\n-\tlinkgit:git-diff[1] `--diff-algorithm`.\n+\tUse a different diff algorithm while merging, which can help\n+\tavoid mismerges that occur due to unimportant matching lines\n+\t(such as braces from distinct functions).  See also\n+\tlinkgit:git-diff[1] `--diff-algorithm`.  Defaults to the\n+\t`diff.algorithm` config setting.\n \n ignore-space-change;;\n ignore-all-space;;\n-- \ngitgitgadget\n\n"},{"id":"431928","messageId":"e422a1bc7d431352c00c940ae87e1e013dcd8b9a.1628054936.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v2.git.git.1628054935.gitgitgadget@gmail.com","subject":"[PATCH v2 04/10] merge-strategies.txt: update wording for the resolve strategy","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T05:28:49Z","receivedAt":"2021-08-04T05:29:10Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nIt is probably helpful to cover the default merge strategy first, so\nmove the text for the resolve strategy to later in the document.\n\nFurther, the wording for \"resolve\" claimed that it was \"considered\ngenerally safe and fast\", which might imply in some readers minds that\nthe same is not true of other strategies.  Rather than adding this text\nto all the strategies, just remove it from this one.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/merge-strategies.txt | 13 ++++++-------\n 1 file changed, 6 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\nindex 5d707e952aa..f100fad1e43 100644\n--- a/Documentation/merge-strategies.txt\n+++ b/Documentation/merge-strategies.txt\n@@ -6,13 +6,6 @@ backend 'merge strategies' to be chosen with `-s` option.  Some strategies\n can also take their own options, which can be passed by giving `-X<option>`\n arguments to `git merge` and/or `git pull`.\n \n-resolve::\n-\tThis can only resolve two heads (i.e. the current branch\n-\tand another branch you pulled from) using a 3-way merge\n-\talgorithm.  It tries to carefully detect criss-cross\n-\tmerge ambiguities and is considered generally safe and\n-\tfast.\n-\n recursive::\n \tThis can only resolve two heads using a 3-way merge\n \talgorithm.  When there is more than one common\n@@ -106,6 +99,12 @@ subtree[=<path>];;\n \tis prefixed (or stripped from the beginning) to make the shape of\n \ttwo trees to match.\n \n+resolve::\n+\tThis can only resolve two heads (i.e. the current branch\n+\tand another branch you pulled from) using a 3-way merge\n+\talgorithm.  It tries to carefully detect criss-cross\n+\tmerge ambiguities.  It does not handle renames.\n+\n octopus::\n \tThis resolves cases with more than two heads, but refuses to do\n \ta complex merge that needs manual resolution.  It is\n-- \ngitgitgadget\n\n"},{"id":"431929","messageId":"b1db5fdebe5529d9630129dc7ee5ab0eff6adf69.1628054936.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v2.git.git.1628054935.gitgitgadget@gmail.com","subject":"[PATCH v2 05/10] merge-strategies.txt: do not imply using copy detection is desired","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T05:28:50Z","receivedAt":"2021-08-04T05:29:13Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nStating that the recursive strategy \"currently cannot make use of\ndetected copies\" implies that this is a technical shortcoming of the\ncurrent algorithm.  I disagree with that.  I don't see how copies could\npossibly be used in a sane fashion in a merge algorithm -- would we\npropagate changes in one file on one side of history to each copy of\nthat file when merging?  That makes no sense to me.  I cannot think of\nanything else that would make sense either.  Change the wording to\nsimply state that we ignore any copies.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/merge-strategies.txt | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\nindex f100fad1e43..e2988124581 100644\n--- a/Documentation/merge-strategies.txt\n+++ b/Documentation/merge-strategies.txt\n@@ -16,9 +16,9 @@ recursive::\n \tcausing mismerges by tests done on actual merge commits\n \ttaken from Linux 2.6 kernel development history.\n \tAdditionally this can detect and handle merges involving\n-\trenames, but currently cannot make use of detected\n-\tcopies.  This is the default merge strategy when pulling\n-\tor merging one branch.\n+\trenames.  It does not make use of detected copies.  This\n+\tis the default merge strategy when pulling or merging one\n+\tbranch.\n +\n The 'recursive' strategy can take the following options:\n \n-- \ngitgitgadget\n\n"},{"id":"431930","messageId":"d1521f98deec5973718dabe5051f55383dbb05b8.1628054936.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v2.git.git.1628054935.gitgitgadget@gmail.com","subject":"[PATCH v2 07/10] merge-strategies.txt: fix simple capitalization error","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T05:28:52Z","receivedAt":"2021-08-04T05:29:14Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/git-rebase.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex c3edcb07e3e..cecdcfff47a 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -529,7 +529,7 @@ The `--rebase-merges` mode is similar in spirit to the deprecated\n where commits can be reordered, inserted and dropped at will.\n +\n It is currently only possible to recreate the merge commits using the\n-`recursive` merge strategy; Different merge strategies can be used only via\n+`recursive` merge strategy; different merge strategies can be used only via\n explicit `exec git merge -s <strategy> [...]` commands.\n +\n See also REBASING MERGES and INCOMPATIBLE OPTIONS below.\n-- \ngitgitgadget\n\n"},{"id":"431931","messageId":"44101062e0e0bfb55a476e91037464738fcb6f70.1628054936.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v2.git.git.1628054935.gitgitgadget@gmail.com","subject":"[PATCH v2 06/10] merge-strategies.txt: avoid giving special preference to patience algorithm","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T05:28:51Z","receivedAt":"2021-08-04T05:29:15Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nWe already have diff-algorithm that explains why there are special diff\nalgorithms, so we do not need to re-explain patience.  patience exists\nas its own toplevel option for historical reasons, but there's no reason\nto give it special preference or document it again and suggest it's more\nimportant than other diff algorithms, so just refer to it as a\ndeprecated shorthand for `diff-algorithm=patience`.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/merge-strategies.txt | 6 +-----\n 1 file changed, 1 insertion(+), 5 deletions(-)\n\ndiff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\nindex e2988124581..b54bcf68f2d 100644\n--- a/Documentation/merge-strategies.txt\n+++ b/Documentation/merge-strategies.txt\n@@ -37,11 +37,7 @@ theirs;;\n \tno 'theirs' merge strategy to confuse this merge option with.\n \n patience;;\n-\tWith this option, 'merge-recursive' spends a little extra time\n-\tto avoid mismerges that sometimes occur due to unimportant\n-\tmatching lines (e.g., braces from distinct functions).  Use\n-\tthis when the branches to be merged have diverged wildly.\n-\tSee also linkgit:git-diff[1] `--patience`.\n+\tDeprecated synonym for `diff-algorithm=patience`.\n \n diff-algorithm=[patience|minimal|histogram|myers];;\n \tUse a different diff algorithm while merging, which can help\n-- \ngitgitgadget\n\n"},{"id":"431932","messageId":"8978132397e95accee5676309d81832724aebba5.1628054936.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v2.git.git.1628054935.gitgitgadget@gmail.com","subject":"[PATCH v2 08/10] git-rebase.txt: correct out-of-date and misleading text about renames","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T05:28:53Z","receivedAt":"2021-08-04T05:29:16Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nCommit 58634dbff8 (\"rebase: Allow merge strategies to be used when\nrebasing\", 2006-06-21) added the --merge option to git-rebase so that\nrenames could be detected (at least when using the `recursive` merge\nbackend).  However, git-am -3 gained that same ability in commit\n579c9bb198 (\"Use merge-recursive in git-am -3.\", 2006-12-28).  As such,\nthe comment about being able to detect renames is not particularly\nnoteworthy.  Remove it.  While tweaking this description, add a quick\ncomment about when --merge became the default.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/git-rebase.txt | 4 +---\n 1 file changed, 1 insertion(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex cecdcfff47a..73d49ec8d91 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -340,9 +340,7 @@ See also INCOMPATIBLE OPTIONS below.\n \n -m::\n --merge::\n-\tUse merging strategies to rebase.  When the recursive (default) merge\n-\tstrategy is used, this allows rebase to be aware of renames on the\n-\tupstream side.  This is the default.\n+\tUsing merging strategies to rebase (default).\n +\n Note that a rebase merge works by replaying each commit from the working\n branch on top of the <upstream> branch.  Because of this, when a merge\n-- \ngitgitgadget\n\n"},{"id":"431933","messageId":"bc92826f7e5e55978d4261b9c01626c215753990.1628054936.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v2.git.git.1628054935.gitgitgadget@gmail.com","subject":"[PATCH v2 09/10] merge-strategies.txt: add coverage of the `ort` merge strategy","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T05:28:54Z","receivedAt":"2021-08-04T05:29:17Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/merge-strategies.txt | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)\n\ndiff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\nindex b54bcf68f2d..210f0f850b2 100644\n--- a/Documentation/merge-strategies.txt\n+++ b/Documentation/merge-strategies.txt\n@@ -95,6 +95,20 @@ subtree[=<path>];;\n \tis prefixed (or stripped from the beginning) to make the shape of\n \ttwo trees to match.\n \n+ort::\n+\tThis is meant as a drop-in replacement for the `recursive`\n+\talgorithm (as reflected in its acronym -- \"Ostensibly\n+\tRecursive's Twin\"), and will likely replace it in the future.\n+\tIt fixes corner cases that the `recursive` strategy handles\n+\tsuboptimally, and is significantly faster in large\n+\trepositories -- especially when many renames are involved.\n++\n+The `ort` strategy takes all the same options as `recursive`.\n+However, it ignores three of those options: `no-renames`,\n+`patience` and `diff-algorithm`.  It always runs with rename\n+detection (it handles it much faster than `recursive` does), and\n+it specifically uses `diff-algorithm=histogram`.\n+\n resolve::\n \tThis can only resolve two heads (i.e. the current branch\n \tand another branch you pulled from) using a 3-way merge\n-- \ngitgitgadget\n\n"},{"id":"431934","messageId":"4a78ac53424525d7099867d5a4377b8afb9bf18f.1628054936.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v2.git.git.1628054935.gitgitgadget@gmail.com","subject":"[PATCH v2 10/10] Update error message and code comment","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T05:28:55Z","receivedAt":"2021-08-04T05:29:17Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nThere were two locations in the code that referred to 'merge-recursive'\nbut which were also applicable to 'merge-ort'.  Update them to more\ngeneral wording.\n\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n builtin/merge.c | 2 +-\n sequencer.c     | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex a8a843b1f54..d7b14bf4a7f 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -738,7 +738,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,\n \n \t\tfor (x = 0; x < xopts_nr; x++)\n \t\t\tif (parse_merge_opt(&o, xopts[x]))\n-\t\t\t\tdie(_(\"Unknown option for merge-recursive: -X%s\"), xopts[x]);\n+\t\t\t\tdie(_(\"unknown strategy option: -X%s\"), xopts[x]);\n \n \t\to.branch1 = head_arg;\n \t\to.branch2 = merge_remote_util(remoteheads->item)->name;\ndiff --git a/sequencer.c b/sequencer.c\nindex 7f07cd00f3f..a4e5c43fcf2 100644\n--- a/sequencer.c\n+++ b/sequencer.c\n@@ -2065,7 +2065,7 @@ static int do_pick_commit(struct repository *r,\n \t\t/*\n \t\t * We do not intend to commit immediately.  We just want to\n \t\t * merge the differences in, so let's compute the tree\n-\t\t * that represents the \"current\" state for merge-recursive\n+\t\t * that represents the \"current\" state for the merge machinery\n \t\t * to work on.\n \t\t */\n \t\tif (write_index_as_tree(&head, r->index, r->index_file, 0, NULL))\n-- \ngitgitgadget\n"},{"id":"431938","messageId":"xmqqk0l1rb57.fsf@gitster.g","threadId":"56206","inReplyTo":"pull.1059.v2.git.git.1628054935.gitgitgadget@gmail.com","subject":"Re: [PATCH v2 00/10] Documentation updates: merge-strategies","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-08-04T06:12:36Z","receivedAt":"2021-08-04T06:12:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Elijah Newren via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> Changes since v1:\n>\n>  * Multiple tweaks suggested by Eric, Dscho, and Junio\n>  * Removed patch 7 explaining no-renames since that probably belongs in git\n>    diff --no-renames instead, and this series is about merge-strategies.\n>  * Inserted a new patch 8 that strikes some misleading or at least\n>    no-longer-important text from git-rebase.txt (due changes back in late\n>    2006).\n\nLooking good.\nWill queue, together with the \"switch\" patches on top.\nThanks.\n"},{"id":"431960","messageId":"e2e1cbb1-3e6b-bb4f-1e13-b1652dd50ec7@gmail.com","threadId":"56206","inReplyTo":"xmqqk0l1rb57.fsf@gitster.g","subject":"Re: [PATCH v2 00/10] Documentation updates: merge-strategies","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2021-08-04T14:56:20Z","receivedAt":"2021-08-04T14:56:25Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 8/4/2021 2:12 AM, Junio C Hamano wrote:\n> \"Elijah Newren via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n> \n>> Changes since v1:\n>>\n>>  * Multiple tweaks suggested by Eric, Dscho, and Junio\n>>  * Removed patch 7 explaining no-renames since that probably belongs in git\n>>    diff --no-renames instead, and this series is about merge-strategies.\n>>  * Inserted a new patch 8 that strikes some misleading or at least\n>>    no-longer-important text from git-rebase.txt (due changes back in late\n>>    2006).\n> \n> Looking good.\n> Will queue, together with the \"switch\" patches on top.\n\nChiming in to say I like this version, too.\n\nThanks!\n-Stolee\n"},{"id":"431962","messageId":"eff818fc-9f4d-35db-a4df-8b05408d7d6c@ramsayjones.plus.com","threadId":"56206","inReplyTo":"8978132397e95accee5676309d81832724aebba5.1628054936.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v2 08/10] git-rebase.txt: correct out-of-date and misleading text about renames","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2021-08-04T15:50:43Z","receivedAt":"2021-08-04T15:58:20Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Hi Elijah,\n\nOn 04/08/2021 06:28, Elijah Newren via GitGitGadget wrote:\n> From: Elijah Newren <newren@gmail.com>\n> \n> Commit 58634dbff8 (\"rebase: Allow merge strategies to be used when\n> rebasing\", 2006-06-21) added the --merge option to git-rebase so that\n> renames could be detected (at least when using the `recursive` merge\n> backend).  However, git-am -3 gained that same ability in commit\n> 579c9bb198 (\"Use merge-recursive in git-am -3.\", 2006-12-28).  As such,\n> the comment about being able to detect renames is not particularly\n> noteworthy.  Remove it.  While tweaking this description, add a quick\n> comment about when --merge became the default.\n\nThe last sentence of the commit message does not seem to apply to\nthis patch (any more ...?).\n\n[Awesome work on 'merge -sort', by the way!]\n\nATB,\nRamsay Jones\n\n> \n> Signed-off-by: Elijah Newren <newren@gmail.com>\n> ---\n>  Documentation/git-rebase.txt | 4 +---\n>  1 file changed, 1 insertion(+), 3 deletions(-)\n> \n> diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\n> index cecdcfff47a..73d49ec8d91 100644\n> --- a/Documentation/git-rebase.txt\n> +++ b/Documentation/git-rebase.txt\n> @@ -340,9 +340,7 @@ See also INCOMPATIBLE OPTIONS below.\n>  \n>  -m::\n>  --merge::\n> -\tUse merging strategies to rebase.  When the recursive (default) merge\n> -\tstrategy is used, this allows rebase to be aware of renames on the\n> -\tupstream side.  This is the default.\n> +\tUsing merging strategies to rebase (default).\n>  +\n>  Note that a rebase merge works by replaying each commit from the working\n>  branch on top of the <upstream> branch.  Because of this, when a merge\n> \n"},{"id":"431964","messageId":"CABPp-BHgnSu+9ZxEQMDR1x+2Z0zCX2ysqxoH0t=W+a8yrL1L_w@mail.gmail.com","threadId":"56206","inReplyTo":"eff818fc-9f4d-35db-a4df-8b05408d7d6c@ramsayjones.plus.com","subject":"Re: [PATCH v2 08/10] git-rebase.txt: correct out-of-date and misleading text about renames","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2021-08-04T17:18:36Z","receivedAt":"2021-08-04T17:18:49Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Wed, Aug 4, 2021 at 9:50 AM Ramsay Jones <ramsay@ramsayjones.plus.com> wrote:\n>\n> Hi Elijah,\n>\n> On 04/08/2021 06:28, Elijah Newren via GitGitGadget wrote:\n> > From: Elijah Newren <newren@gmail.com>\n> >\n> > Commit 58634dbff8 (\"rebase: Allow merge strategies to be used when\n> > rebasing\", 2006-06-21) added the --merge option to git-rebase so that\n> > renames could be detected (at least when using the `recursive` merge\n> > backend).  However, git-am -3 gained that same ability in commit\n> > 579c9bb198 (\"Use merge-recursive in git-am -3.\", 2006-12-28).  As such,\n> > the comment about being able to detect renames is not particularly\n> > noteworthy.  Remove it.  While tweaking this description, add a quick\n> > comment about when --merge became the default.\n>\n> The last sentence of the commit message does not seem to apply to\n> this patch (any more ...?).\n\nDoh!  Yes, you're right, that last sentence should be removed.\n\n> [Awesome work on 'merge -sort', by the way!]\n\nThanks!\n\n> ATB,\n> Ramsay Jones\n"},{"id":"431989","messageId":"nycvar.QRO.7.76.6.2108042342080.55@tvgsbejvaqbjf.bet","threadId":"56206","inReplyTo":"CABPp-BFuHiBGC-JnneJYCUWbX4VAT22wTFh=W2msca9A7Yovjw@mail.gmail.com","subject":"Re: [PATCH 08/10] merge-strategies.txt: fix simple capitalization error","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2021-08-04T21:42:26Z","receivedAt":"2021-08-04T21:42:36Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Elijah,\n\nOn Tue, 3 Aug 2021, Elijah Newren wrote:\n\n> On Tue, Aug 3, 2021 at 5:01 PM Johannes Schindelin\n> <Johannes.Schindelin@gmx.de> wrote:\n> >\n> > Hi Elijah,\n> >\n> > On Tue, 3 Aug 2021, Elijah Newren via GitGitGadget wrote:\n> >\n> > > From: Elijah Newren <newren@gmail.com>\n> > >\n> > > Signed-off-by: Elijah Newren <newren@gmail.com>\n> > > ---\n> > >  Documentation/git-rebase.txt | 2 +-\n> > >  1 file changed, 1 insertion(+), 1 deletion(-)\n> > >\n> > > diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\n> > > index 7044afba362..b4429954480 100644\n> > > --- a/Documentation/git-rebase.txt\n> > > +++ b/Documentation/git-rebase.txt\n> > > @@ -530,7 +530,7 @@ The `--rebase-merges` mode is similar in spirit to the deprecated\n> > >  where commits can be reordered, inserted and dropped at will.\n> > >  +\n> > >  It is currently only possible to recreate the merge commits using the\n> > > -`recursive` merge strategy; Different merge strategies can be used only via\n> > > +`recursive` merge strategy; different merge strategies can be used only via\n> >\n> > I am not a native speaker, so I'm eager to learn what is the correct thing\n> > to do here. In particular since I continued in lower-case after a\n> > semicolon for _years_, right up until some native speaker mentioned that\n> > that's only correct if I continue with an incomplete sentence. If a\n> > complete sentence follows the semicolon, so the advice went, I should\n> > start the sentence with an upper-case letter.\n> >\n> > Could you help me understand the correct rules here?\n>\n> First I've ever heard of it; I just presumed it was a typo.  I don't\n> pretend to be an expert on such topics (and although native speakers\n> may have an edge in knowing what \"sounds natural\", I tend to presume\n> we are less likely to know the rules).  However, some quick internet\n> searches suggest that different style guides differ on whether to\n> follow a *colon* with a capital letter[1][2][3], but everything I can\n> find suggests that *semicolons* should always be followed by a\n> lowercase letter (with exceptions for proper nouns)[2][4][5][and\n> others...].\n>\n> [1] http://www.sussex.ac.uk/informatics/punctuation/colonandsemi/colon\n> [2] https://www.quora.com/Why-is-capitalization-necessary-after-a-semi-colon\n> [3] https://writingcenter.unc.edu/tips-and-tools/semi-colons-colons-and-dashes/\n> [4] https://writeanswers.royalroads.ca/faq/199268\n> [5] https://wordcounter.net/blog/2016/06/24/101812_capitalize-words-colon-semi-colon.html\n>\n> So, after reading through the above links, I'm fairly convinced that\n> 'different' should be lowercase here.\n\nThank you for the detailed answer,\nDscho\n"},{"id":"431990","messageId":"nycvar.QRO.7.76.6.2108042346230.55@tvgsbejvaqbjf.bet","threadId":"56206","inReplyTo":"pull.1059.v2.git.git.1628054935.gitgitgadget@gmail.com","subject":"Re: [PATCH v2 00/10] Documentation updates: merge-strategies","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2021-08-04T21:47:02Z","receivedAt":"2021-08-04T21:47:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Elijah,\n\nOn Wed, 4 Aug 2021, Elijah Newren via GitGitGadget wrote:\n\n> Range-diff vs v1:\n> [...]\n\nThis looks good to me.\n\nThank you for making this a very pleasant review,\nDscho\n"},{"id":"432015","messageId":"75b81598a8085d7135fa80e3add317e09fd9fac2.1628121054.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v3.git.git.1628121054.gitgitgadget@gmail.com","subject":"[PATCH v3 01/10] git-rebase.txt: correct antiquated claims about --rebase-merges","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T23:50:45Z","receivedAt":"2021-08-04T23:51:00Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nWhen --rebase-merges was first introduced, it only worked with the\n`recursive` strategy.  Some time later, it gained support for merges\nusing the `octopus` strategy.  The limitation of only supporting these\ntwo strategies was documented in 25cff9f109 (\"rebase -i --rebase-merges:\nadd a section to the man page\", 2018-04-25) and lifted in e145d99347\n(\"rebase -r: support merge strategies other than `recursive`\",\n2019-07-31).  However, when the limitation was lifted, the documentation\nwas not updated.  Update it now.\n\nAcked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nAcked-by: Derrick Stolee <dstolee@microsoft.com>\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/git-rebase.txt | 16 ++++++++++------\n 1 file changed, 10 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 55af6fd24e2..8a67227846a 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -1219,12 +1219,16 @@ successful merge so that the user can edit the message.\n If a `merge` command fails for any reason other than merge conflicts (i.e.\n when the merge operation did not even start), it is rescheduled immediately.\n \n-At this time, the `merge` command will *always* use the `recursive`\n-merge strategy for regular merges, and `octopus` for octopus merges,\n-with no way to choose a different one. To work around\n-this, an `exec` command can be used to call `git merge` explicitly,\n-using the fact that the labels are worktree-local refs (the ref\n-`refs/rewritten/onto` would correspond to the label `onto`, for example).\n+By default, the `merge` command will use the `recursive` merge\n+strategy for regular merges, and `octopus` for octopus merges.  One\n+can specify a default strategy for all merges using the `--strategy`\n+argument when invoking rebase, or can override specific merges in the\n+interactive list of commands by using an `exec` command to call `git\n+merge` explicitly with a `--strategy` argument.  Note that when\n+calling `git merge` explicitly like this, you can make use of the fact\n+that the labels are worktree-local refs (the ref `refs/rewritten/onto`\n+would correspond to the label `onto`, for example) in order to refer\n+to the branches you want to merge.\n \n Note: the first command (`label onto`) labels the revision onto which\n the commits are rebased; The name `onto` is just a convention, as a nod\n-- \ngitgitgadget\n\n"},{"id":"432016","messageId":"pull.1059.v3.git.git.1628121054.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v2.git.git.1628054935.gitgitgadget@gmail.com","subject":"[PATCH v3 00/10] Documentation updates: merge-strategies","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T23:50:44Z","receivedAt":"2021-08-04T23:51:00Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"I noticed while updating my switch-default-merge-strategy-to-ort submission,\nthat many of the changes were good documentation updates that we might want\nfor Git v2.33.0. So I pulled those changes out and split them into lots of\nlittle commits so that if any parts need discussion or are objectionable, we\ncan just drop those from this series and apply the rest for v2.33.0.\n\nThe first 9 commits are just small documentation updates, but there is one\ncommit at the end that updates an error message and a code comment.\n\nChanges since v1:\n\n * Multiple tweaks suggested by Eric, Dscho, and Junio\n * Removed patch 7 explaining no-renames since that probably belongs in git\n   diff --no-renames instead, and this series is about merge-strategies.\n * Inserted a new patch 8 that strikes some misleading or at least\n   no-longer-important text from git-rebase.txt (due changes back in late\n   2006).\n\nChanges since v2:\n\n * Removed sentence from commit message of patch 8 referring to a change in\n   v1 that was since removed.\n * Added Stolee's and Dscho's Acked-bys.\n\nElijah Newren (10):\n  git-rebase.txt: correct antiquated claims about --rebase-merges\n  directory-rename-detection.txt: small updates due to merge-ort\n    optimizations\n  Documentation: edit awkward references to `git merge-recursive`\n  merge-strategies.txt: update wording for the resolve strategy\n  merge-strategies.txt: do not imply using copy detection is desired\n  merge-strategies.txt: avoid giving special preference to patience\n    algorithm\n  merge-strategies.txt: fix simple capitalization error\n  git-rebase.txt: correct out-of-date and misleading text about renames\n  merge-strategies.txt: add coverage of the `ort` merge strategy\n  Update error message and code comment\n\n Documentation/git-rebase.txt                  | 27 ++++++-----\n Documentation/merge-options.txt               |  4 +-\n Documentation/merge-strategies.txt            | 48 +++++++++++--------\n .../technical/directory-rename-detection.txt  | 14 +++---\n builtin/merge.c                               |  2 +-\n sequencer.c                                   |  2 +-\n 6 files changed, 55 insertions(+), 42 deletions(-)\n\n\nbase-commit: 66262451ec94d30ac4b80eb3123549cf7a788afd\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1059%2Fnewren%2Fort-doc-updates-v3\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1059/newren/ort-doc-updates-v3\nPull-Request: https://github.com/git/git/pull/1059\n\nRange-diff vs v2:\n\n  1:  34352397168 !  1:  75b81598a80 git-rebase.txt: correct antiquated claims about --rebase-merges\n     @@ Commit message\n          was not updated.  Update it now.\n      \n          Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n     +    Acked-by: Derrick Stolee <dstolee@microsoft.com>\n          Signed-off-by: Elijah Newren <newren@gmail.com>\n      \n       ## Documentation/git-rebase.txt ##\n  2:  3fdd068231a !  2:  69fa233483c directory-rename-detection.txt: small updates due to merge-ort optimizations\n     @@ Commit message\n          directory-rename-detection.txt had claims that all of that logic was\n          found in merge-recursive.  Update the documentation.\n      \n     +    Acked-by: Derrick Stolee <dstolee@microsoft.com>\n     +    Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n          Signed-off-by: Elijah Newren <newren@gmail.com>\n      \n       ## Documentation/technical/directory-rename-detection.txt ##\n  3:  2a38320c2be !  3:  48f72d7e028 Documentation: edit awkward references to `git merge-recursive`\n     @@ Commit message\n          when rebase was a shell script, but it seems like a rather indirect way\n          to refer to the `recursive` strategy.  Simplify the references.\n      \n     +    Acked-by: Derrick Stolee <dstolee@microsoft.com>\n     +    Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n          Signed-off-by: Elijah Newren <newren@gmail.com>\n      \n       ## Documentation/git-rebase.txt ##\n  4:  e422a1bc7d4 !  4:  81a3092b9b0 merge-strategies.txt: update wording for the resolve strategy\n     @@ Commit message\n          the same is not true of other strategies.  Rather than adding this text\n          to all the strategies, just remove it from this one.\n      \n     +    Acked-by: Derrick Stolee <dstolee@microsoft.com>\n     +    Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n          Signed-off-by: Elijah Newren <newren@gmail.com>\n      \n       ## Documentation/merge-strategies.txt ##\n  5:  b1db5fdebe5 !  5:  1d144757a2e merge-strategies.txt: do not imply using copy detection is desired\n     @@ Commit message\n          anything else that would make sense either.  Change the wording to\n          simply state that we ignore any copies.\n      \n     +    Acked-by: Derrick Stolee <dstolee@microsoft.com>\n     +    Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n          Signed-off-by: Elijah Newren <newren@gmail.com>\n      \n       ## Documentation/merge-strategies.txt ##\n  6:  44101062e0e !  6:  a8381a89065 merge-strategies.txt: avoid giving special preference to patience algorithm\n     @@ Commit message\n          important than other diff algorithms, so just refer to it as a\n          deprecated shorthand for `diff-algorithm=patience`.\n      \n     +    Acked-by: Derrick Stolee <dstolee@microsoft.com>\n     +    Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n          Signed-off-by: Elijah Newren <newren@gmail.com>\n      \n       ## Documentation/merge-strategies.txt ##\n  7:  d1521f98dee !  7:  2c82aacbcbd merge-strategies.txt: fix simple capitalization error\n     @@ Metadata\n       ## Commit message ##\n          merge-strategies.txt: fix simple capitalization error\n      \n     +    Acked-by: Derrick Stolee <dstolee@microsoft.com>\n     +    Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n          Signed-off-by: Elijah Newren <newren@gmail.com>\n      \n       ## Documentation/git-rebase.txt ##\n  8:  8978132397e !  8:  032dcf7c18e git-rebase.txt: correct out-of-date and misleading text about renames\n     @@ Commit message\n          backend).  However, git-am -3 gained that same ability in commit\n          579c9bb198 (\"Use merge-recursive in git-am -3.\", 2006-12-28).  As such,\n          the comment about being able to detect renames is not particularly\n     -    noteworthy.  Remove it.  While tweaking this description, add a quick\n     -    comment about when --merge became the default.\n     +    noteworthy.  Remove it.\n      \n     +    Acked-by: Derrick Stolee <dstolee@microsoft.com>\n     +    Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n          Signed-off-by: Elijah Newren <newren@gmail.com>\n      \n       ## Documentation/git-rebase.txt ##\n  9:  bc92826f7e5 !  9:  9ae77dbc291 merge-strategies.txt: add coverage of the `ort` merge strategy\n     @@ Metadata\n       ## Commit message ##\n          merge-strategies.txt: add coverage of the `ort` merge strategy\n      \n     +    Acked-by: Derrick Stolee <dstolee@microsoft.com>\n     +    Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n          Signed-off-by: Elijah Newren <newren@gmail.com>\n      \n       ## Documentation/merge-strategies.txt ##\n 10:  4a78ac53424 ! 10:  0b881131b2b Update error message and code comment\n     @@ Commit message\n          but which were also applicable to 'merge-ort'.  Update them to more\n          general wording.\n      \n     +    Acked-by: Derrick Stolee <dstolee@microsoft.com>\n     +    Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n          Signed-off-by: Elijah Newren <newren@gmail.com>\n      \n       ## builtin/merge.c ##\n\n-- \ngitgitgadget\n"},{"id":"432017","messageId":"69fa233483cbbed1f93524e63a681ade64951943.1628121054.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v3.git.git.1628121054.gitgitgadget@gmail.com","subject":"[PATCH v3 02/10] directory-rename-detection.txt: small updates due to merge-ort optimizations","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T23:50:46Z","receivedAt":"2021-08-04T23:51:02Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nIn commit 0c4fd732f0 (\"Move computation of dir_rename_count from\nmerge-ort to diffcore-rename\", 2021-02-27), much of the logic for\ncomputing directory renames moved into diffcore-rename.\ndirectory-rename-detection.txt had claims that all of that logic was\nfound in merge-recursive.  Update the documentation.\n\nAcked-by: Derrick Stolee <dstolee@microsoft.com>\nAcked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n .../technical/directory-rename-detection.txt       | 14 ++++++++------\n 1 file changed, 8 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/technical/directory-rename-detection.txt b/Documentation/technical/directory-rename-detection.txt\nindex 49b83ef3cc4..029ee2cedc5 100644\n--- a/Documentation/technical/directory-rename-detection.txt\n+++ b/Documentation/technical/directory-rename-detection.txt\n@@ -2,9 +2,9 @@ Directory rename detection\n ==========================\n \n Rename detection logic in diffcore-rename that checks for renames of\n-individual files is aggregated and analyzed in merge-recursive for cases\n-where combinations of renames indicate that a full directory has been\n-renamed.\n+individual files is also aggregated there and then analyzed in either\n+merge-ort or merge-recursive for cases where combinations of renames\n+indicate that a full directory has been renamed.\n \n Scope of abilities\n ------------------\n@@ -88,9 +88,11 @@ directory rename detection support in:\n     Folks have requested in the past that `git diff` detect directory\n     renames and somehow simplify its output.  It is not clear whether this\n     would be desirable or how the output should be simplified, so this was\n-    simply not implemented.  Further, to implement this, directory rename\n-    detection logic would need to move from merge-recursive to\n-    diffcore-rename.\n+    simply not implemented.  Also, while diffcore-rename has most of the\n+    logic for detecting directory renames, some of the logic is still found\n+    within merge-ort and merge-recursive.  Fully supporting directory\n+    rename detection in diffs would require copying or moving the remaining\n+    bits of logic to the diff machinery.\n \n   * am\n \n-- \ngitgitgadget\n\n"},{"id":"432018","messageId":"48f72d7e0286a9cad5476292c45e811ff77596fd.1628121054.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v3.git.git.1628121054.gitgitgadget@gmail.com","subject":"[PATCH v3 03/10] Documentation: edit awkward references to `git merge-recursive`","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T23:50:47Z","receivedAt":"2021-08-04T23:51:04Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nA few places in the documentation referred to the \"`recursive` strategy\"\nusing the phrase \"`git merge-recursive`\", suggesting that it was forking\nsubprocesses to call a toplevel builtin.  Perhaps that was relevant to\nwhen rebase was a shell script, but it seems like a rather indirect way\nto refer to the `recursive` strategy.  Simplify the references.\n\nAcked-by: Derrick Stolee <dstolee@microsoft.com>\nAcked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/git-rebase.txt       | 5 ++---\n Documentation/merge-options.txt    | 4 ++--\n Documentation/merge-strategies.txt | 9 +++++----\n 3 files changed, 9 insertions(+), 9 deletions(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 8a67227846a..c3edcb07e3e 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -354,9 +354,8 @@ See also INCOMPATIBLE OPTIONS below.\n \n -s <strategy>::\n --strategy=<strategy>::\n-\tUse the given merge strategy.\n-\tIf there is no `-s` option 'git merge-recursive' is used\n-\tinstead.  This implies --merge.\n+\tUse the given merge strategy, instead of the default\n+\t`recursive`.  This implies `--merge`.\n +\n Because 'git rebase' replays each commit from the working branch\n on top of the <upstream> branch using the given strategy, using\ndiff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt\nindex eb0aabd396f..f819bd8dd68 100644\n--- a/Documentation/merge-options.txt\n+++ b/Documentation/merge-options.txt\n@@ -112,8 +112,8 @@ With --squash, --commit is not allowed, and will fail.\n \tUse the given merge strategy; can be supplied more than\n \tonce to specify them in the order they should be tried.\n \tIf there is no `-s` option, a built-in list of strategies\n-\tis used instead ('git merge-recursive' when merging a single\n-\thead, 'git merge-octopus' otherwise).\n+\tis used instead (`recursive` when merging a single head,\n+\t`octopus` otherwise).\n \n -X <option>::\n --strategy-option=<option>::\ndiff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\nindex 2912de706bf..5d707e952aa 100644\n--- a/Documentation/merge-strategies.txt\n+++ b/Documentation/merge-strategies.txt\n@@ -51,10 +51,11 @@ patience;;\n \tSee also linkgit:git-diff[1] `--patience`.\n \n diff-algorithm=[patience|minimal|histogram|myers];;\n-\tTells 'merge-recursive' to use a different diff algorithm, which\n-\tcan help avoid mismerges that occur due to unimportant matching\n-\tlines (such as braces from distinct functions).  See also\n-\tlinkgit:git-diff[1] `--diff-algorithm`.\n+\tUse a different diff algorithm while merging, which can help\n+\tavoid mismerges that occur due to unimportant matching lines\n+\t(such as braces from distinct functions).  See also\n+\tlinkgit:git-diff[1] `--diff-algorithm`.  Defaults to the\n+\t`diff.algorithm` config setting.\n \n ignore-space-change;;\n ignore-all-space;;\n-- \ngitgitgadget\n\n"},{"id":"432019","messageId":"81a3092b9b0509906d3b9d4d85c8f706c7492200.1628121054.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v3.git.git.1628121054.gitgitgadget@gmail.com","subject":"[PATCH v3 04/10] merge-strategies.txt: update wording for the resolve strategy","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T23:50:48Z","receivedAt":"2021-08-04T23:51:06Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nIt is probably helpful to cover the default merge strategy first, so\nmove the text for the resolve strategy to later in the document.\n\nFurther, the wording for \"resolve\" claimed that it was \"considered\ngenerally safe and fast\", which might imply in some readers minds that\nthe same is not true of other strategies.  Rather than adding this text\nto all the strategies, just remove it from this one.\n\nAcked-by: Derrick Stolee <dstolee@microsoft.com>\nAcked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/merge-strategies.txt | 13 ++++++-------\n 1 file changed, 6 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\nindex 5d707e952aa..f100fad1e43 100644\n--- a/Documentation/merge-strategies.txt\n+++ b/Documentation/merge-strategies.txt\n@@ -6,13 +6,6 @@ backend 'merge strategies' to be chosen with `-s` option.  Some strategies\n can also take their own options, which can be passed by giving `-X<option>`\n arguments to `git merge` and/or `git pull`.\n \n-resolve::\n-\tThis can only resolve two heads (i.e. the current branch\n-\tand another branch you pulled from) using a 3-way merge\n-\talgorithm.  It tries to carefully detect criss-cross\n-\tmerge ambiguities and is considered generally safe and\n-\tfast.\n-\n recursive::\n \tThis can only resolve two heads using a 3-way merge\n \talgorithm.  When there is more than one common\n@@ -106,6 +99,12 @@ subtree[=<path>];;\n \tis prefixed (or stripped from the beginning) to make the shape of\n \ttwo trees to match.\n \n+resolve::\n+\tThis can only resolve two heads (i.e. the current branch\n+\tand another branch you pulled from) using a 3-way merge\n+\talgorithm.  It tries to carefully detect criss-cross\n+\tmerge ambiguities.  It does not handle renames.\n+\n octopus::\n \tThis resolves cases with more than two heads, but refuses to do\n \ta complex merge that needs manual resolution.  It is\n-- \ngitgitgadget\n\n"},{"id":"432020","messageId":"a8381a89065e8fb428ad8f980cae34f3231d9a77.1628121054.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v3.git.git.1628121054.gitgitgadget@gmail.com","subject":"[PATCH v3 06/10] merge-strategies.txt: avoid giving special preference to patience algorithm","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T23:50:50Z","receivedAt":"2021-08-04T23:51:07Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nWe already have diff-algorithm that explains why there are special diff\nalgorithms, so we do not need to re-explain patience.  patience exists\nas its own toplevel option for historical reasons, but there's no reason\nto give it special preference or document it again and suggest it's more\nimportant than other diff algorithms, so just refer to it as a\ndeprecated shorthand for `diff-algorithm=patience`.\n\nAcked-by: Derrick Stolee <dstolee@microsoft.com>\nAcked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/merge-strategies.txt | 6 +-----\n 1 file changed, 1 insertion(+), 5 deletions(-)\n\ndiff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\nindex e2988124581..b54bcf68f2d 100644\n--- a/Documentation/merge-strategies.txt\n+++ b/Documentation/merge-strategies.txt\n@@ -37,11 +37,7 @@ theirs;;\n \tno 'theirs' merge strategy to confuse this merge option with.\n \n patience;;\n-\tWith this option, 'merge-recursive' spends a little extra time\n-\tto avoid mismerges that sometimes occur due to unimportant\n-\tmatching lines (e.g., braces from distinct functions).  Use\n-\tthis when the branches to be merged have diverged wildly.\n-\tSee also linkgit:git-diff[1] `--patience`.\n+\tDeprecated synonym for `diff-algorithm=patience`.\n \n diff-algorithm=[patience|minimal|histogram|myers];;\n \tUse a different diff algorithm while merging, which can help\n-- \ngitgitgadget\n\n"},{"id":"432021","messageId":"1d144757a2e2f84428a7c2330ca5f9339072b524.1628121054.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v3.git.git.1628121054.gitgitgadget@gmail.com","subject":"[PATCH v3 05/10] merge-strategies.txt: do not imply using copy detection is desired","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T23:50:49Z","receivedAt":"2021-08-04T23:51:08Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nStating that the recursive strategy \"currently cannot make use of\ndetected copies\" implies that this is a technical shortcoming of the\ncurrent algorithm.  I disagree with that.  I don't see how copies could\npossibly be used in a sane fashion in a merge algorithm -- would we\npropagate changes in one file on one side of history to each copy of\nthat file when merging?  That makes no sense to me.  I cannot think of\nanything else that would make sense either.  Change the wording to\nsimply state that we ignore any copies.\n\nAcked-by: Derrick Stolee <dstolee@microsoft.com>\nAcked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/merge-strategies.txt | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\nindex f100fad1e43..e2988124581 100644\n--- a/Documentation/merge-strategies.txt\n+++ b/Documentation/merge-strategies.txt\n@@ -16,9 +16,9 @@ recursive::\n \tcausing mismerges by tests done on actual merge commits\n \ttaken from Linux 2.6 kernel development history.\n \tAdditionally this can detect and handle merges involving\n-\trenames, but currently cannot make use of detected\n-\tcopies.  This is the default merge strategy when pulling\n-\tor merging one branch.\n+\trenames.  It does not make use of detected copies.  This\n+\tis the default merge strategy when pulling or merging one\n+\tbranch.\n +\n The 'recursive' strategy can take the following options:\n \n-- \ngitgitgadget\n\n"},{"id":"432022","messageId":"2c82aacbcbd752e1944605d370e4d8677f778c73.1628121054.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v3.git.git.1628121054.gitgitgadget@gmail.com","subject":"[PATCH v3 07/10] merge-strategies.txt: fix simple capitalization error","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T23:50:51Z","receivedAt":"2021-08-04T23:51:09Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nAcked-by: Derrick Stolee <dstolee@microsoft.com>\nAcked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/git-rebase.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex c3edcb07e3e..cecdcfff47a 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -529,7 +529,7 @@ The `--rebase-merges` mode is similar in spirit to the deprecated\n where commits can be reordered, inserted and dropped at will.\n +\n It is currently only possible to recreate the merge commits using the\n-`recursive` merge strategy; Different merge strategies can be used only via\n+`recursive` merge strategy; different merge strategies can be used only via\n explicit `exec git merge -s <strategy> [...]` commands.\n +\n See also REBASING MERGES and INCOMPATIBLE OPTIONS below.\n-- \ngitgitgadget\n\n"},{"id":"432023","messageId":"032dcf7c18e4d14f8bb6b892cca6d554f5020d65.1628121054.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v3.git.git.1628121054.gitgitgadget@gmail.com","subject":"[PATCH v3 08/10] git-rebase.txt: correct out-of-date and misleading text about renames","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T23:50:52Z","receivedAt":"2021-08-04T23:51:10Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nCommit 58634dbff8 (\"rebase: Allow merge strategies to be used when\nrebasing\", 2006-06-21) added the --merge option to git-rebase so that\nrenames could be detected (at least when using the `recursive` merge\nbackend).  However, git-am -3 gained that same ability in commit\n579c9bb198 (\"Use merge-recursive in git-am -3.\", 2006-12-28).  As such,\nthe comment about being able to detect renames is not particularly\nnoteworthy.  Remove it.\n\nAcked-by: Derrick Stolee <dstolee@microsoft.com>\nAcked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/git-rebase.txt | 4 +---\n 1 file changed, 1 insertion(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex cecdcfff47a..73d49ec8d91 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -340,9 +340,7 @@ See also INCOMPATIBLE OPTIONS below.\n \n -m::\n --merge::\n-\tUse merging strategies to rebase.  When the recursive (default) merge\n-\tstrategy is used, this allows rebase to be aware of renames on the\n-\tupstream side.  This is the default.\n+\tUsing merging strategies to rebase (default).\n +\n Note that a rebase merge works by replaying each commit from the working\n branch on top of the <upstream> branch.  Because of this, when a merge\n-- \ngitgitgadget\n\n"},{"id":"432024","messageId":"9ae77dbc2910dab773039f602e5878d4102d340f.1628121054.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v3.git.git.1628121054.gitgitgadget@gmail.com","subject":"[PATCH v3 09/10] merge-strategies.txt: add coverage of the `ort` merge strategy","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T23:50:53Z","receivedAt":"2021-08-04T23:51:11Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nAcked-by: Derrick Stolee <dstolee@microsoft.com>\nAcked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n Documentation/merge-strategies.txt | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)\n\ndiff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt\nindex b54bcf68f2d..210f0f850b2 100644\n--- a/Documentation/merge-strategies.txt\n+++ b/Documentation/merge-strategies.txt\n@@ -95,6 +95,20 @@ subtree[=<path>];;\n \tis prefixed (or stripped from the beginning) to make the shape of\n \ttwo trees to match.\n \n+ort::\n+\tThis is meant as a drop-in replacement for the `recursive`\n+\talgorithm (as reflected in its acronym -- \"Ostensibly\n+\tRecursive's Twin\"), and will likely replace it in the future.\n+\tIt fixes corner cases that the `recursive` strategy handles\n+\tsuboptimally, and is significantly faster in large\n+\trepositories -- especially when many renames are involved.\n++\n+The `ort` strategy takes all the same options as `recursive`.\n+However, it ignores three of those options: `no-renames`,\n+`patience` and `diff-algorithm`.  It always runs with rename\n+detection (it handles it much faster than `recursive` does), and\n+it specifically uses `diff-algorithm=histogram`.\n+\n resolve::\n \tThis can only resolve two heads (i.e. the current branch\n \tand another branch you pulled from) using a 3-way merge\n-- \ngitgitgadget\n\n"},{"id":"432025","messageId":"0b881131b2b103605cc2ceec5cca6270694844b8.1628121054.git.gitgitgadget@gmail.com","threadId":"56206","inReplyTo":"pull.1059.v3.git.git.1628121054.gitgitgadget@gmail.com","subject":"[PATCH v3 10/10] Update error message and code comment","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-08-04T23:50:54Z","receivedAt":"2021-08-04T23:51:12Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@gmail.com>\n\nThere were two locations in the code that referred to 'merge-recursive'\nbut which were also applicable to 'merge-ort'.  Update them to more\ngeneral wording.\n\nAcked-by: Derrick Stolee <dstolee@microsoft.com>\nAcked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Elijah Newren <newren@gmail.com>\n---\n builtin/merge.c | 2 +-\n sequencer.c     | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex a8a843b1f54..d7b14bf4a7f 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -738,7 +738,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,\n \n \t\tfor (x = 0; x < xopts_nr; x++)\n \t\t\tif (parse_merge_opt(&o, xopts[x]))\n-\t\t\t\tdie(_(\"Unknown option for merge-recursive: -X%s\"), xopts[x]);\n+\t\t\t\tdie(_(\"unknown strategy option: -X%s\"), xopts[x]);\n \n \t\to.branch1 = head_arg;\n \t\to.branch2 = merge_remote_util(remoteheads->item)->name;\ndiff --git a/sequencer.c b/sequencer.c\nindex 7f07cd00f3f..a4e5c43fcf2 100644\n--- a/sequencer.c\n+++ b/sequencer.c\n@@ -2065,7 +2065,7 @@ static int do_pick_commit(struct repository *r,\n \t\t/*\n \t\t * We do not intend to commit immediately.  We just want to\n \t\t * merge the differences in, so let's compute the tree\n-\t\t * that represents the \"current\" state for merge-recursive\n+\t\t * that represents the \"current\" state for the merge machinery\n \t\t * to work on.\n \t\t */\n \t\tif (write_index_as_tree(&head, r->index, r->index_file, 0, NULL))\n-- \ngitgitgadget\n"}]}