@@ -122,11 +122,11 @@ function create_release_commit() {
122
122
function apply_cherry_picks() {
123
123
echo " Applying cherry-picks"
124
124
# Apply cherry-picks
125
- for i in $@ ; do
125
+ for commit in " $@ " ; do
126
126
local previous_head=" $( git rev-parse HEAD) "
127
- echo " Cherry-picking $i "
128
- git cherry-pick $i > /dev/null || {
129
- echo " Failed to cherry-pick $i . please resolve the conflict and exit." >&2
127
+ echo " Cherry-picking ${commit} "
128
+ git cherry-pick ${commit} > /dev/null || {
129
+ echo " Failed to cherry-pick ${commit} . please resolve the conflict and exit." >&2
130
130
echo " Use 'git cherry-pick --abort; exit' to abort the cherry-picks." >&2
131
131
echo " Use 'git cherry-pick --continue; exit' to resolve the conflict." >&2
132
132
bash
@@ -137,7 +137,7 @@ function apply_cherry_picks() {
137
137
}
138
138
# Add the origin of the cherry-pick in case the patch-id diverge and we cannot
139
139
# find the original commit.
140
- git notes --ref=cherrypick add -f -m " $i "
140
+ git notes --ref=cherrypick add -f -m " ${commit} "
141
141
done
142
142
return 0
143
143
}
@@ -147,9 +147,9 @@ function find_last_release() {
147
147
local branch=" ${1:- HEAD} "
148
148
local baseline=" ${2:- $(get_release_baseline " ${branch} " )} "
149
149
local changes=" $( git log --pretty=format:%H " ${baseline} ~" .." ${branch} " ) "
150
- for i in ${changes} ; do
151
- if git notes --ref=release show $i & > /dev/null; then
152
- echo $i
150
+ for change in ${changes} ; do
151
+ if git notes --ref=release show ${change} & > /dev/null; then
152
+ echo ${change}
153
153
return 0
154
154
fi
155
155
done
0 commit comments