SIGN IN SIGN UP

root: make TestLicenseHeaders skip files unknown to git

The license header test walked the whole tree, so scratch files,
worktrees, and other untracked local files made "go test ." fail in a
developer checkout. Ask git for the set of tracked files and only
check those, falling back to checking everything (as before) when the
tree is not a git checkout, such as in a release tarball.

Fixes #20740

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Change-Id: I9f3a7c21e5b804d6a2f4c8e19d7b53a6e0c412fd
B
Brad Fitzpatrick committed
12e4462ba3d8c6860bf6f7678d2f5b1e43a228d0
Parent: 91c1bbe
Committed by Brad Fitzpatrick <brad@danga.com> on 8/4/2026, 9:47:35 AM