Skip to content

Comment on Diff So Fancy: make Git diffs look goodparent

Comments

diff --patience uses a different algorithm that works to optimise the diffed number of lines (it's less efficient though), which will probably solve your issue (the way the standard algorithm works is to essentially find common features on a first-come-first-served basis.

The two diffs have exactly the same number of lines here, the difference is which lines are selected as part of the insertion.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.