Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the diff algorithm used by Github?

Tags:

git

github

diff

Git supports 4 diff algorithms Myers, Minimal, Patience, and Histogram. And Myers is used as the default algorithm.

What is the diffing algorithm used by Github in Pull requests and supported by Commits API?

like image 460
system64 Avatar asked May 13 '20 08:05

system64


1 Answers

GitHub uses the default algorithm, myers. It can optionally be modified to ignore whitespace, but is not otherwise configurable.

This isn't a guarantee of compatibility; it's just what's used at this moment.

like image 106
bk2204 Avatar answered Sep 27 '22 22:09

bk2204