isaacs / github

Just a place to track issues and feature requests that I have for github
2.2k stars 129 forks source link

git diff --patience #455

Open sharpobject opened 8 years ago

sharpobject commented 8 years ago

Hello,

I use diffs on github and github enterprise a lot. I would prefer if they were generated using the Patience Diff algorithm, so that they would be less noisy and closer to the intent of the author of the change. I would write a big explanation of why Patience Diff is better, but Bram Cohen already wrote one at http://bramcohen.livejournal.com/73318.html

This doesn't need to be "settings creep." Just generate all diffs on the entire site using Patience Diff and take away the option to use an inferior algorithm.

cirosantilli commented 8 years ago

I would also look into https://github.com/libgit2/libgit2 and it's Ruby API https://github.com/libgit2/rugged support, as GitHub likely uses those. And if not present, make a feature request there as well.

sharpobject commented 8 years ago

It looks like this is supported in libgit2 but not in rugged.

stuartpb commented 8 years ago

Has this suggestion been emailed to GitHub?

sharpobject commented 8 years ago

Yes!

stuartpb commented 8 years ago

:+1:, with the caveat that the implemented default diff algorithm should be the faster-than-Myers "histogram" variant of the patience algorithm.

mcw0933 commented 8 years ago

:+1:

joe-mojo commented 5 years ago

I prefer the "histogram" algorithm. We should be able to choose.

AlexDaniel commented 3 years ago

I've seen a case where histogram produced a diff that was just as bad as default, while patience was able to present changes in a very human friendly way.