mirror of
https://github.com/git-for-windows/git.git
synced 2026-05-05 17:40:24 -05:00
Merge pull request #2180 from dscho/t6500-and-msys2-runtime-v3.x
Prepare the gc tests for v3.x of the MSYS2 runtime
This commit is contained in:
@@ -162,7 +162,15 @@ test_expect_success 'background auto gc respects lock for all operations' '
|
||||
# now fake a concurrent gc that holds the lock; we can use our
|
||||
# shell pid so that it looks valid.
|
||||
hostname=$(hostname || echo unknown) &&
|
||||
printf "$$ %s" "$hostname" >.git/gc.pid &&
|
||||
shell_pid=$$ &&
|
||||
if test_have_prereq MINGW && test -f /proc/$shell_pid/winpid
|
||||
then
|
||||
# In Git for Windows, Bash (actually, the MSYS2 runtime) has a
|
||||
# different idea of PIDs than git.exe (actually Windows). Use
|
||||
# the Windows PID in this case.
|
||||
shell_pid=$(cat /proc/$shell_pid/winpid)
|
||||
fi &&
|
||||
printf "%d %s" "$shell_pid" "$hostname" >.git/gc.pid &&
|
||||
|
||||
# our gc should exit zero without doing anything
|
||||
run_and_wait_for_auto_gc &&
|
||||
|
||||
Reference in New Issue
Block a user