From 652e0ce7d0ded66f1e562deac0af1d6677aa68e0 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Wed, 23 Sep 2026 22:47:02 +0000 Subject: [PATCH] Fix the `jj_push.sh` script to work on macOS (#7820) It had a few subtle GNU extensions in it that didn't work on macOS. There are simple portable alternatives so it was easy to adapt. Assisted-by: Antigravity with Gemini --- scripts/jj_push.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/jj_push.sh b/scripts/jj_push.sh index 2a4670406641..3af9be6aead0 100755 --- a/scripts/jj_push.sh +++ b/scripts/jj_push.sh @@ -56,8 +56,8 @@ REMOTE="$(sed -n 's/^Changes to push to \(.*\):$/\1/p' <<<"$PLAN")" # Each updated bookmark or tag reports the commit it moves to. Deletions have no # such commit, and send nothing to check. -TARGETS="$(sed -n 's/^ \(bookmark\|tag\): .* to \([0-9a-f]\{8,\}\)\]$/\2/p' <<<"$PLAN" | - paste -sd '|')" +TARGETS="$(sed -E -n 's/^ (bookmark|tag): .* to ([0-9a-f]{8,})\]$/\2/p' <<<"$PLAN" | + paste -sd '|' -)" # Nothing to check, so just push. if [[ -z "$REMOTE" || -z "$TARGETS" ]]; then