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
This commit is contained in:
Chandler Carruth
2026-09-23 22:47:02 +00:00
committed by GitHub
parent c832d7c11c
commit 652e0ce7d0
+2 -2
View File
@@ -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 # Each updated bookmark or tag reports the commit it moves to. Deletions have no
# such commit, and send nothing to check. # such commit, and send nothing to check.
TARGETS="$(sed -n 's/^ \(bookmark\|tag\): .* to \([0-9a-f]\{8,\}\)\]$/\2/p' <<<"$PLAN" | TARGETS="$(sed -E -n 's/^ (bookmark|tag): .* to ([0-9a-f]{8,})\]$/\2/p' <<<"$PLAN" |
paste -sd '|')" paste -sd '|' -)"
# Nothing to check, so just push. # Nothing to check, so just push.
if [[ -z "$REMOTE" || -z "$TARGETS" ]]; then if [[ -z "$REMOTE" || -z "$TARGETS" ]]; then