瀏覽代碼

Merge pull request #111 from zricethezav/fix-wl-commit

rm commit count log
Zachary Rice 7 年之前
父節點
當前提交
160015b872
共有 2 個文件被更改,包括 6 次插入6 次删除
  1. 4 0
      CHANGELOG.md
  2. 2 6
      main.go

+ 4 - 0
CHANGELOG.md

@@ -1,6 +1,10 @@
 CHANGELOG
 =========
 
+1.11.1
+----
+- fix commit whitelist logic
+
 1.11.0
 -----
 - Commit depth option

+ 2 - 6
main.go

@@ -128,7 +128,7 @@ type gitDiff struct {
 }
 
 const defaultGithubURL = "https://api.github.com/"
-const version = "1.11.0"
+const version = "1.11.1"
 const errExit = 2
 const leakExit = 1
 const defaultConfig = `
@@ -462,6 +462,7 @@ func auditGitReference(repo *RepoDescriptor, ref *plumbing.Reference) []Leak {
 		commitCount = commitCount + 1
 		totalCommits = totalCommits + 1
 		if whiteListCommits[c.Hash.String()] {
+			prevCommit = c
 			log.Infof("skipping commit: %s\n", c.Hash.String())
 			return nil
 		}
@@ -552,11 +553,6 @@ func auditGitReference(repo *RepoDescriptor, ref *plumbing.Reference) []Leak {
 		return nil
 	})
 	commitWg.Wait()
-
-	if opts.Verbose {
-		log.Infof("%d commits inspected for %s", commitCount, repo.name)
-	}
-
 	return leaks
 }