mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 13:14:22 +01:00
Fix commit option
The --commit option was being ignored becase the Close() function doesn't stop the iterator. According to the documentation: https://godoc.org/gopkg.in/src-d/go-git.v4/plumbing/object#FileIter.ForEach an ErrStop error should be send to stop it.
This commit is contained in:
1 parent
08498600d1
commit
9144594d77
2 files changed
+10
No files matched your search
@@ -560,6 +560,14 @@ func TestAuditRepo(t *testing.T) {
|
||||
numLeaks: 0,
|
||||
configPath: path.Join(configsDir, "repo"),
|
||||
},
|
||||
{
|
||||
repo: leaksRepo,
|
||||
description: "Audit until specific commit",
|
||||
numLeaks: 1,
|
||||
testOpts: Options{
|
||||
Commit: "f6839959b7bbdcd23008f1fb16f797f35bcd3a0c",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
whiteListCommits = make(map[string]bool)
|
||||
|
||||
Reference in new issue
Block a user