mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 12:14:22 +01:00
Clean up 'uncommitted' diff. (#416)
This commit is contained in:
1 parent
eabc7b5c12
commit
31d03a1146
1 file changed
+2
-1
+2
-1
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user