From a56b15320444fcfe3aabdd3768c81c733f3d776b Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Sat, 29 Aug 2026 00:35:58 -0700 Subject: Bake the short git commit hash (plus -dirty suffix) into the binary and trace it at startup alongside the build timestamp. A --logfile trace could previously only be tied back to a build timestamp, not the exact source state -- distinguishing same-day rebuilds during A/B testing required diffing binaries. GIT_COMMIT is injected via GNUmakefile (git rev-parse --short HEAD, kept out of the PROFILE variable itself since PROFILE gets separately stringified whole for the "Make profile used" trace line, and this value's embedded quotes broke that outer string literal when first tried folded in there). Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01EortUUkDVpsfrbqshBJYJg --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index b09c8f0..baafe12 100755 --- a/src/main.c +++ b/src/main.c @@ -47,7 +47,7 @@ Return value: { char *p; - Trace("Typhoon %s (built on %s %s):\n", VERSION, __DATE__, __TIME__); + Trace("Typhoon %s (built on %s %s, commit %s):\n", VERSION, __DATE__, __TIME__, GIT_COMMIT); Trace(" Copyright (C) 2000-2007, Scott Gasch (scott.gasch@gmail.com)\n"); Trace(" " REVISION); Trace(" " COMPILER_STRING); -- cgit v1.3