We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 723360b + ba78a47 commit a1e0422Copy full SHA for a1e0422
t/t6500-gc.sh
@@ -181,7 +181,15 @@ test_expect_success 'background auto gc respects lock for all operations' '
181
# now fake a concurrent gc that holds the lock; we can use our
182
# shell pid so that it looks valid.
183
hostname=$(hostname || echo unknown) &&
184
- printf "$$ %s" "$hostname" >.git/gc.pid &&
+ shell_pid=$$ &&
185
+ if test_have_prereq MINGW && test -f /proc/$shell_pid/winpid
186
+ then
187
+ # In Git for Windows, Bash (actually, the MSYS2 runtime) has a
188
+ # different idea of PIDs than git.exe (actually Windows). Use
189
+ # the Windows PID in this case.
190
+ shell_pid=$(cat /proc/$shell_pid/winpid)
191
+ fi &&
192
+ printf "%d %s" "$shell_pid" "$hostname" >.git/gc.pid &&
193
194
# our gc should exit zero without doing anything
195
run_and_wait_for_auto_gc &&
0 commit comments