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.
This commit is contained in:
Tobias Gesellchen
2026-01-11 17:30:37 +01:00
parent 1ed562f45e
commit d03682fb96
+1 -5
View File
@@ -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")