Skip to content

Commit

Permalink
Fix hack/cherry_pick_pull.sh on OS X (sigh):
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zmerlynn committed Jul 16, 2015
1 parent 8f3c310 commit fb86132
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hack/cherry_pick_pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fb86132

Please sign in to comment.