{"action":"closed","issue":{"url":"https://api.github.com/repos/sergi/go-diff/issues/29","repository_url":"https://api.github.com/repos/sergi/go-diff","labels_url":"https://api.github.com/repos/sergi/go-diff/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/sergi/go-diff/issues/29/comments","events_url":"https://api.github.com/repos/sergi/go-diff/issues/29/events","html_url":"https://github.com/sergi/go-diff/issues/29","id":162760691,"number":29,"title":"A bug in DiffText1","user":{"login":"tkf","id":29282,"avatar_url":"https://avatars.githubusercontent.com/u/29282?v=3","gravatar_id":"","url":"https://api.github.com/users/tkf","html_url":"https://github.com/tkf","followers_url":"https://api.github.com/users/tkf/followers","following_url":"https://api.github.com/users/tkf/following{/other_user}","gists_url":"https://api.github.com/users/tkf/gists{/gist_id}","starred_url":"https://api.github.com/users/tkf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkf/subscriptions","organizations_url":"https://api.github.com/users/tkf/orgs","repos_url":"https://api.github.com/users/tkf/repos","events_url":"https://api.github.com/users/tkf/events{/privacy}","received_events_url":"https://api.github.com/users/tkf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-28T18:59:54Z","updated_at":"2016-10-31T18:44:38Z","closed_at":"2016-10-31T18:44:38Z","body":"With some texts, DiffText1 returns a wrong result. An example of such data is dmp.go of revision b94bf7 and b94bf7^. To see this, get text1.go (which just prints DiffText1) from https://gist.github.com/tkf/12bde871bf794e59bea88b659ed5b95b and run it as:\n\n``` sh\ncd PATH/TO/go-diff/diffmatchpatch\ndiff <(go run PATH/TO/text1.go <(git show 'b94bf7:./dmp.go') <(git show 'b94bf7^:./dmp.go')) <(git show 'b94bf7:./dmp.go')\n```\n\nwhich pints\n\n``` diff\n471c471\n<\n---\n>                                       break\n658c658\n<\n---\n>\n```\n\ni.e., `dmp.DiffText1(diffs) != text1`.\n\nThe above gist also includes `text1.bash` which automates finding such examples. For example, I found many such examples by running:\n\n``` sh\ngit clone https://go.googlesource.com/go\ncd go/src\nPATH/TO/text1.bash **/*.go > examples\n```\n"}}
{"actor":{"display_login":"zimmski"}}