SIGN IN SIGN UP

version: use -g hash prefix in unstamped builds of other repos

The unstamped Long() fallback (plain go build/install, no linker
stamps) always prefixed the buildvcs commit hash with "t". But that
hash describes the main module's repo, which for binaries built from a
repo that imports tailscale.com (e.g. Tailscale's proprietary repo) is
not the tailscale.com repo. That made e.g.
"1.103.0-dev20260811-t4bb67392c" ambiguous with the stamped scheme,
where "t" always means the tailscale.com commit and "g" the commit of
the repo the binary was built from.

Keep "t" when the main module is tailscale.com itself, and use "g"
otherwise, matching mkversion's meaning of the two prefixes.

Updates tailscale/corp#44945

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Change-Id: I42ed6dce6572854ead487b20b0889460c47d0f58
B
Brad Fitzpatrick committed
69efc99bd2b7711b9ca5dbf128144a9f3a99b7c9
Parent: d2c5166
Committed by Brad Fitzpatrick <brad@danga.com> on 8/11/2026, 12:43:02 PM