From ea5808d833af70c7212194eda4a2c4a9f8fe0680 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Tue, 1 Mar 2016 18:11:06 +0100 Subject: [PATCH] Only check specified paths in check-authors.go --- script/check-authors.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/script/check-authors.go b/script/check-authors.go index 9c034b96c..c9060513d 100644 --- a/script/check-authors.go +++ b/script/check-authors.go @@ -42,7 +42,7 @@ func init() { } func main() { - actual := actualAuthorEmails() + actual := actualAuthorEmails("cmd/", "lib/", "gui/", "test/", "script/") listed := listedAuthorEmails() missing := actual.except(listed) if len(missing) > 0 { @@ -56,8 +56,9 @@ func main() { // actualAuthorEmails returns the set of author emails found in the actual git // commit log, except those in excluded commits. -func actualAuthorEmails() stringSet { - cmd := exec.Command("git", "log", "--format=%H %ae") +func actualAuthorEmails(paths ...string) stringSet { + args := append([]string{"log", "--format=%H %ae"}, paths...) + cmd := exec.Command("git", args...) bs, err := cmd.Output() if err != nil { log.Fatal("authorEmails:", err)