From 2f0f3880e68545e951aca197a13fb9abb2d8cf3b Mon Sep 17 00:00:00 2001 From: Linus Gasser Date: Sat, 13 Jun 2026 22:39:16 +0200 Subject: [PATCH] fix(formatter): guard ShortenID/SmallSHA against short input ShortenID and SmallSHA sliced their input to a fixed length without checking it was long enough, panicking on shorter strings. Return the input unchanged when it is already shorter than the cut. Also replace the blank Commit placeholder with an explicit "unknown-commit" sentinel. (cherry picked from commit eeb4ea8b9cc7b04aa2c4048e6419eb76a88c69ff) --- cmd/abra/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/abra/main.go b/cmd/abra/main.go index d31d1e82..514583ad 100644 --- a/cmd/abra/main.go +++ b/cmd/abra/main.go @@ -16,7 +16,7 @@ func main() { Version = "dev" } if Commit == "" { - Commit = " " + Commit = "unknown-commit" } cli.Run(Version, Commit)