From af9fe63b0c45f9035184f61f0acbd65af0f3ce12 Mon Sep 17 00:00:00 2001 From: Shaked Eyal Date: Thu, 6 Aug 2026 18:29:36 +0300 Subject: [PATCH] fix(slug): replace slash in branch name instead of deleting it Aligns gstack-slug with ship Step 8's tr '/' '-' so gstack-review-log and gstack-review-read stop writing feat/foo to featfoo while other writers use feat-foo. The [a-zA-Z0-9._-] invariant promised in the file header still holds; tr -cd remains the final filter. Refs #1127 --- bin/gstack-slug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/gstack-slug b/bin/gstack-slug index 24bbca4f1..87d4bb9ba 100755 --- a/bin/gstack-slug +++ b/bin/gstack-slug @@ -49,7 +49,7 @@ if [[ -n "$SLUG" ]]; then fi RAW_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null) || RAW_BRANCH="" -BRANCH=$(printf '%s' "${RAW_BRANCH:-}" | tr -cd 'a-zA-Z0-9._-') +BRANCH=$(printf '%s' "${RAW_BRANCH:-}" | tr '/' '-' | tr -cd 'a-zA-Z0-9._-') BRANCH="${BRANCH:-unknown}" echo "SLUG=$SLUG" echo "BRANCH=$BRANCH"