File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 1
- version : 10.1.17
1
+ version : 10.1.18
Original file line number Diff line number Diff line change @@ -64,6 +64,18 @@ delete_process_lock_files () {
64
64
fi
65
65
}
66
66
67
+ git_checkout () {
68
+ revision=" $REVISION "
69
+ # when revision is Gerrit branch we need to fetch it explicitly
70
+ if [[ " $REVISION " =~ ^refs/changes/[0-9]+/[0-9]+/[0-9]+$ ]]; then
71
+ echo " Fetching Gerrit Change ref: $REVISION "
72
+ git_retry git fetch origin $REVISION
73
+ revision=" FETCH_HEAD"
74
+ fi
75
+
76
+ git checkout $revision
77
+ }
78
+
67
79
trap exit_trap EXIT
68
80
set -e
69
81
@@ -165,7 +177,7 @@ if [ -d "$CLONE_DIR" ]; then
165
177
if [ -n " $REVISION " ]; then
166
178
167
179
echo " Updating repository to revision $REVISION "
168
- git checkout $REVISION
180
+ git_checkout
169
181
170
182
CURRENT_BRANCH=" ` git branch 2> /dev/null | grep ' ^*' | cut -d' ' -f2-` "
171
183
@@ -184,7 +196,7 @@ if [ -d "$CLONE_DIR" ]; then
184
196
cd $CLONE_DIR
185
197
186
198
if [ -n " $REVISION " ]; then
187
- git checkout $REVISION
199
+ git_checkout
188
200
fi
189
201
fi
190
202
else
193
205
eval $GIT_COMMAND
194
206
cd $CLONE_DIR
195
207
if [ -n " $REVISION " ]; then
196
- git checkout $REVISION
208
+ git_checkout
197
209
fi
198
210
199
211
fi
You can’t perform that action at this time.
0 commit comments