tailscale/util
Brad Fitzpatrick b39ee0445d util/httpm: open .git/index to defeat Go test caching
TestUsedConsistently shells out to git grep to find forbidden
http.Method* uses across the repo. Since the test itself doesn't
open any repo files, Go's test cache considers it unchanged
between commits and serves stale passing results even when new
violations are introduced.

Fix by opening .git/index, which makes Go's test cache track it
as an input. The index file changes on git reset, checkout, pull,
etc., so the cache is properly invalidated when moving between
commits.

Updates tailscale/corp#40359

Change-Id: If1497b992a545351bdd68cff279d60f5591fe70b
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-04-15 15:44:19 -07:00
..
backoff all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
bufiox derp,types,util: use bufio Peek+Discard for allocation-free fast reads (#19067) 2026-03-24 10:52:20 -04:00
checkchange all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
cibuild all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
clientmetric all: fix six tests that failed with -count=2 2026-04-13 18:52:57 -07:00
cloudenv all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
cloudinfo all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
cmpver cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
codegen all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
cstruct all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
ctxkey all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
deephash cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
dirwalk all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
dnsname all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
eventbus cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
execqueue all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
expvarx all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
goroutines all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
groupmember all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
hashx all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
httphdr all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
httpm util/httpm: open .git/index to defeat Go test caching 2026-04-15 15:44:19 -07:00
limiter all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
lineiter all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
lineread all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
linuxfw util/linuxfw,wgengine/router: allow incoming CGNAT range traffic with nodeattr 2026-04-14 16:45:06 -04:00
lru all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
mak all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
multierr all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
must all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
nocasemaps all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
osdiag util/osdiag: fix typo in comment (reciever -> receiver) 2026-03-23 12:54:38 +00:00
osshare all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
osuser util/osuser: extend id command fallback for group IDs to freebsd 2026-03-09 08:39:07 +00:00
pidowner all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
pool all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
precompress all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
progresstracking all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
prompt all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
qrcodes all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
quarantine all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
race all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
racebuild all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
rands all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
reload all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
ringlog all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
safediff all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
set all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
singleflight all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
slicesx all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
stringsx all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
syspolicy cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
sysresources all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
testenv all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
topk all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
truncate all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
usermetric all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
vizerror all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
winutil all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
zstdframe all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00