Files
Brad Fitzpatrick 1a3a1da16f misc/git_hook/githook: don't rebuild hooks after every OSS bump
The launcher found the shared HOOK_VERSION via `go list -m -f
'{{.Dir}}' tailscale.com`. But go list -m doesn't download modules, so
after a repo bumps its tailscale.com dependency to a version not yet in
the module cache, Dir is empty, SHARED_VER falls back to 0, and the
launcher rebuilds ts-git-hook-bin even though the shared HOOK_VERSION
didn't change. In corp, which can sometimes bump OSS a few times a
day, that meant a spurious "git-hook: rebuilding ts-git-hook-bin..."
(plus a module download) on the first git operation after most bumps.

If Dir is empty, run `go mod download tailscale.com` and look again.
The rebuild was going to download the module anyway.

Bump HOOK_VERSION so existing installs pick up the new launcher.

Updates tailscale/corp#40381

Change-Id: I6e4720702d7052df3b15dce0c60a8b313c6b48e3
Signed-off-by: Brad Fitzpatrick <[email protected]>
2026-11-25 08:54:24 -08:00
..