From fb8613201b1a2804b934564dfb53d3ba32beda1a Mon Sep 17 00:00:00 2001 From: Zach Loafman Date: Wed, 15 Jul 2015 21:01:11 -0700 Subject: [PATCH] Fix hack/cherry_pick_pull.sh on OS X (sigh): On OS X bash, for whatever reason, the ancient, forsaken bash version (3.2!?) that will never be updated because it might insult the memory of Steve Jobs doesn't allow me to accidentally escape the hash character. Fix the unnecessary escaping. For reviewers out there wondering about this syntax, it's documented here: http://www.tldp.org/LDP/abs/html/parameter-substitution.html under: ``` ${var/#Pattern/Replacement} If prefix of var matches Pattern, then substitute Replacement for Pattern. ``` It just looks odd here because I'm adding the hash character to the start of each array element. --- hack/cherry_pick_pull.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/cherry_pick_pull.sh b/hack/cherry_pick_pull.sh index b53a26adc78..cf47dd96f69 100755 --- a/hack/cherry_pick_pull.sh +++ b/hack/cherry_pick_pull.sh @@ -53,8 +53,8 @@ shift 1 declare -r PULLS=( "$@" ) function join { local IFS="$1"; shift; echo "$*"; } -declare -r PULLDASH=$(join - "${PULLS[@]/#/\#}") # Generates something like "#12345-#56789" -declare -r PULLSUBJ=$(join " " "${PULLS[@]/#/\#}") # Generates something like "#12345 #56789" +declare -r PULLDASH=$(join - "${PULLS[@]/#/#}") # Generates something like "#12345-#56789" +declare -r PULLSUBJ=$(join " " "${PULLS[@]/#/#}") # Generates something like "#12345 #56789" echo "+++ Updating remotes..." git remote update