mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-27 19:54:24 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c20d5d85c | ||
|
|
ac43c67a47 | ||
|
|
d2d68a7e44 | ||
|
|
27aee19a35 | ||
|
|
a56c2341cf |
No files matched your search
@@ -1,5 +1,9 @@
|
||||
CHANGELOG
|
||||
=========
|
||||
1.25.1
|
||||
----
|
||||
- Fixing #188
|
||||
|
||||
1.25.0
|
||||
----
|
||||
- Pretty big refactor, see `src` directory
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package gitleaks
|
||||
|
||||
const version = "1.25.0"
|
||||
const version = "1.25.1"
|
||||
|
||||
const defaultGithubURL = "https://api.github.com/"
|
||||
const defaultThreadNum = 1
|
||||
|
||||
+7
-5
@@ -181,11 +181,10 @@ func (repoInfo *RepoInfo) audit() ([]Leak, error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
commitCount = commitCount + 1
|
||||
totalCommits = totalCommits + 1
|
||||
|
||||
// commits w/o parent (root of git the git ref) or option for single commit is not empty str
|
||||
if len(c.ParentHashes) == 0 || opts.Commit == c.Hash.String() {
|
||||
if (len(c.ParentHashes) == 0 && opts.Commit == "") || (len(c.ParentHashes) == 0 && opts.Commit == c.Hash.String()) {
|
||||
commitCount = commitCount + 1
|
||||
totalCommits = totalCommits + 1
|
||||
leaksFromSingleCommit := repoInfo.auditSingleCommit(c)
|
||||
mutex.Lock()
|
||||
leaks = append(leaksFromSingleCommit, leaks...)
|
||||
@@ -196,10 +195,13 @@ func (repoInfo *RepoInfo) audit() ([]Leak, error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
if opts.Commit != "" {
|
||||
if opts.Commit != "" && opts.Commit != c.Hash.String() {
|
||||
return nil
|
||||
}
|
||||
|
||||
commitCount = commitCount + 1
|
||||
totalCommits = totalCommits + 1
|
||||
|
||||
// regular commit audit
|
||||
err = c.Parents().ForEach(func(parent *object.Commit) error {
|
||||
commitWg.Add(1)
|
||||
|
||||
Reference in new issue
Block a user