Improve for git/svn style diff
Define the function only once for speed
Change the license
v0.2.0