mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-23 15:18:24 +00:00
Only check specified paths in check-authors.go
This commit is contained in:
parent
8b045a826a
commit
ea5808d833
@ -42,7 +42,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
actual := actualAuthorEmails()
|
actual := actualAuthorEmails("cmd/", "lib/", "gui/", "test/", "script/")
|
||||||
listed := listedAuthorEmails()
|
listed := listedAuthorEmails()
|
||||||
missing := actual.except(listed)
|
missing := actual.except(listed)
|
||||||
if len(missing) > 0 {
|
if len(missing) > 0 {
|
||||||
@ -56,8 +56,9 @@ func main() {
|
|||||||
|
|
||||||
// actualAuthorEmails returns the set of author emails found in the actual git
|
// actualAuthorEmails returns the set of author emails found in the actual git
|
||||||
// commit log, except those in excluded commits.
|
// commit log, except those in excluded commits.
|
||||||
func actualAuthorEmails() stringSet {
|
func actualAuthorEmails(paths ...string) stringSet {
|
||||||
cmd := exec.Command("git", "log", "--format=%H %ae")
|
args := append([]string{"log", "--format=%H %ae"}, paths...)
|
||||||
|
cmd := exec.Command("git", args...)
|
||||||
bs, err := cmd.Output()
|
bs, err := cmd.Output()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("authorEmails:", err)
|
log.Fatal("authorEmails:", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user