File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,9 +46,9 @@ git clean -ffxdq
4646# fetch branch if commit is HEAD, respecting BUILDKITE_GIT_FETCH_FLAGS if set
4747FETCH_FLAGS=" ${BUILDKITE_GIT_FETCH_FLAGS:- } "
4848if [[ ${BUILDKITE_COMMIT} = " HEAD" ]]; then
49- git fetch --depth 1 ${FETCH_FLAGS} origin " ${BUILDKITE_BRANCH} "
49+ git fetch --depth 1 " ${FETCH_FLAGS} " origin " ${BUILDKITE_BRANCH} "
5050else
51- git fetch --depth 1 ${FETCH_FLAGS} origin " ${BUILDKITE_COMMIT} "
51+ git fetch --depth 1 " ${FETCH_FLAGS} " origin " ${BUILDKITE_COMMIT} "
5252fi
5353
5454git sparse-checkout set ${NO_CONE_PARAM: +--no-cone} " ${CHECKOUT_PATHS[@]} "
Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ setup() {
8585 export BUILDKITE_GIT_FETCH_FLAGS=" --prune --verbose"
8686 export BUILDKITE_COMMIT=" HEAD"
8787 export BUILDKITE_BRANCH=" main"
88+
89+ stub ssh-keyscan " * : echo 'keyscan'"
8890 stub git " clean * : echo 'git clean'"
8991 stub git " fetch --depth 1 --prune --verbose origin * : echo 'git fetch with flags'"
9092 stub git " sparse-checkout set * * : echo 'git sparse-checkout'"
@@ -95,5 +97,6 @@ setup() {
9597 assert_success
9698 assert_output --partial ' git fetch with flags'
9799
100+ unstub ssh-keyscan
98101 unstub git
99102}
You can’t perform that action at this time.
0 commit comments