Hacker News new | ask | show | jobs
by jrockway 6312 days ago
I think it would be useful. Consider this example.

The original sentence is: "He went to the stoar." Person A sends this to person B for review. While Person B is reviewing this, Person A changes the sentence to "Bill went to the stoar.". Then, Person B sends back the spelling correction; "He went to the store.".

If the sentence translated to one line for `diff` to work on, this would be a merge conflict. If each word was its own line, this would merge cleanly.

1 comments

You've just described dwdiff. Not the smartest diff algo, though its strong point is producing diffs of prose that are human readable. I used it as the core of a wiki with 'perfect' collision resolution. Two people could edit at the same time, and the 2nd to hit save would have their work merged in with dwdiff instead of having their work automatically discarded.