0

In Why is a 3-way merge advantageous over a 2-way merge?, 3-way merge succeeds 2-way merge because it has a common ancestor as a base to compare, but how does vscode implement its diff algorithm even without this information and just compare the difference between 2 individual fils?

tristone
  • 95
  • 6
  • What do *you* mean by "two-way diff"? That phrase normally only comes up when speaking of automobile differential gear sets. And: if you're interested in a vscode-specific answer, why use the [tag:git] tag? – torek Jun 13 '22 at 04:22
  • @torek, 2-way diff is just diff between two individual files without other information such as their common ancestors, I use git tag because it may seem similar to git's diff. – tristone Jun 13 '22 at 07:05
  • That's just called "diff", not "two-way diff". If you're curious about diff algorithms in general, see the last part of chapter 3 of my [prototype book](http://web.torek.net/torek/tmp/book.pdf), pages 60 through 66. – torek Jun 13 '22 at 08:03

0 Answers0