version/mkversion: fix commit date lookup in the tailscale.com checkout path

infoFromDir passed --format=%%ct to git log, which git renders as the
literal string "%ct", so VersionInfo.GitDate was never a timestamp for
builds made directly from a tailscale.com checkout. The corp path in
infoFromCache already used the correct %ct.

Updates tailscale/corp#44945

Change-Id: I28d193019a8dd3d2bdd165da5e4584df1964afd6
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick authored and Brad Fitzpatrick committed 2026-09-29 12:07:08 -07:00
1 parent b31be2cd1e
commit 7649cf9501
1 file changed
+1 -1
+1 -1
View File
@@ -419,7 +419,7 @@ func infoFromDir(dir string) (verInfo, error) {
if err != nil {
return verInfo{}, err
}
date, err := r.output("git", "log", "-n1", "--format=%%ct", "HEAD")
date, err := r.output("git", "log", "-n1", "--format=%ct", "HEAD")
if err != nil {
return verInfo{}, err
}