There was an error while loading. Please reload this page.
1 parent 65c7c23 commit 0652bcbCopy full SHA for 0652bcb
1 file changed
bundler/spec/spec_helper.rb
@@ -115,6 +115,16 @@ def self.ruby=(ruby)
115
ENV["GIT_CONFIG_NOSYSTEM"] = "1"
116
end
117
118
+ # Disable git background maintenance. Since Git 2.46, commands like
119
+ # `git commit` spawn a detached `git maintenance run --auto` process,
120
+ # which briefly creates `.git/objects/maintenance.lock`. That races with
121
+ # specs copying repositories with FileUtils.cp_r, causing flaky ENOENT
122
+ # failures. GIT_CONFIG_COUNT is available since Git 2.31 and silently
123
+ # ignored by older versions.
124
+ ENV["GIT_CONFIG_COUNT"] = "1"
125
+ ENV["GIT_CONFIG_KEY_0"] = "maintenance.auto"
126
+ ENV["GIT_CONFIG_VALUE_0"] = "false"
127
+
128
# Don't wrap output in tests
129
ENV["THOR_COLUMNS"] = "10000"
130
0 commit comments