We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c9d023 commit d9dd41aCopy full SHA for d9dd41a
1 file changed
tests/checkout.bats
@@ -80,3 +80,20 @@ setup() {
80
81
unstub git
82
}
83
+
84
+@test "Respects BUILDKITE_GIT_FETCH_FLAGS in git fetch" {
85
+ export BUILDKITE_GIT_FETCH_FLAGS="--prune --verbose"
86
+ export BUILDKITE_COMMIT="HEAD"
87
+ export BUILDKITE_BRANCH="main"
88
+ stub git "clean * : echo 'git clean'"
89
+ stub git "fetch --depth 1 --prune --verbose origin * : echo 'git fetch with flags'"
90
+ stub git "sparse-checkout set * * : echo 'git sparse-checkout'"
91
+ stub git "checkout * : echo 'checkout'"
92
93
+ run "$PWD"/hooks/checkout
94
95
+ assert_success
96
+ assert_output --partial 'git fetch with flags'
97
98
+ unstub git
99
+}
0 commit comments