On 6 August 2018 at 17:26, Jeff King wrote: > I suspect it still has a bug, which is that it is handling this > first-parent-goes-left case, but probably gets the straight-parent case > wrong. But at least in this form, I think it is obvious to see where > that bug is (the "three" in the comment is not accurate in that latter > case, and it should be two). Yes, thanks, it makes a lot more sense this way. I believe the attached handles both parent types correctly.