From d03682fb967ffde63649e9eee4d03e2a1e704175 Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Sun, 11 Jan 2026 17:30:37 +0100 Subject: [PATCH] refactor: Use full commit hash instead of truncated version Remove unnecessary truncation of Git commit hash from vcs.revision. The full hash provides better traceability and eliminates arbitrary magic numbers in the code. Simpler, cleaner, and more robust approach. --- cmd/soundtouch-cli/main.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cmd/soundtouch-cli/main.go b/cmd/soundtouch-cli/main.go index 3c14605..59cd916 100644 --- a/cmd/soundtouch-cli/main.go +++ b/cmd/soundtouch-cli/main.go @@ -25,11 +25,7 @@ func getBuildInfo() (version, commit, date string) { for _, setting := range info.Settings { switch setting.Key { case "vcs.revision": - if len(setting.Value) >= 7 { - commit = setting.Value[:7] - } else { - commit = setting.Value - } + commit = setting.Value case "vcs.time": if t, err := time.Parse(time.RFC3339, setting.Value); err == nil { date = t.Format("2006-01-02_15:04:05")