Skip to content

Commit

Permalink
Merge pull request #2180 from dscho/t6500-and-msys2-runtime-v3.x
Browse files Browse the repository at this point in the history
Prepare the gc tests for v3.x of the MSYS2 runtime
  • Loading branch information
dscho authored May 6, 2019
2 parents 233535e + ba78a47 commit 3a29b23
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion t/t6500-gc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 3a29b23

Please sign in to comment.