Clean up 'uncommitted' diff. (#416)

This commit is contained in:
Manuel Jeckelmann authored and GitHub committed 2020-07-28 08:55:33 -04:00
1 parent eabc7b5c12
commit 31d03a1146
1 file changed
+2 -1
+2 -1
View File
@@ -281,7 +281,8 @@ func (repo *Repo) scanUncommitted() error {
}
}
diffs := diffmatchpatch.New().DiffMain(prevFileContents, currFileContents, false)
dmp := diffmatchpatch.New()
diffs := dmp.DiffCleanupSemantic(dmp.DiffMain(prevFileContents, currFileContents, false))
var diffContents string
for _, d := range diffs {
if d.Type == diffmatchpatch.DiffInsert {