Files
git/builtin
Johannes Schindelin c2a42d613a maintenance(geometric): avoid deadlocks on Windows 10 (#6215)
This PR is a companion of https://github.com/gitgitgadget/git/pull/2103.

On Windows, `maintenance_task_geometric_repack()` opens pack index files
via `pack_geometry_init()` (which `mmap()`s the `.idx` files), then
spawns `git repack` as a child process without setting
`child.odb_to_close`. The parent's `mmap()`s prevent the child from
deleting old `.idx` files.

On Windows 10 builds before the POSIX delete semantics change (between
Build 17134.1304 and 18363.657, see
https://stackoverflow.com/a/60512798), this results in `Unlink of file
'.git/objects/pack/pack-<hash>.idx' failed. Should I try again?` during
fetch-triggered auto-maintenance with the geometric strategy.

The fix adds the missing `child.odb_to_close = the_repository->objects`
line, matching all other maintenance tasks.

The first commit introduces a `GIT_TEST_LEGACY_DELETE` environment
variable to simulate legacy (pre-POSIX) delete semantics on modern
Windows, so the regression test can verify the fix even on Windows 11.

This fixes https://github.com/git-for-windows/git/issues/6210.

Tested-by: Patryk Miś <foss@patrykmis.com>
2026-06-11 10:52:39 +02:00
..
2026-03-24 12:31:32 -07:00
2026-04-01 10:28:18 -07:00
2026-02-20 08:13:58 -08:00
2026-03-31 20:43:14 -07:00
2025-07-23 08:15:18 -07:00
2026-03-24 12:31:32 -07:00
2025-09-29 11:40:35 -07:00
2025-07-23 08:15:18 -07:00
2026-03-24 12:31:32 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:18 -07:00
2025-07-01 14:46:38 -07:00
2026-03-31 20:43:14 -07:00
2025-08-22 13:13:20 -07:00
2026-04-08 10:19:17 -07:00
2026-03-12 14:09:07 -07:00
2026-03-23 09:20:30 -07:00
2026-04-08 10:19:17 -07:00
2026-03-23 08:33:10 -07:00
2025-08-21 13:47:00 -07:00
2026-03-23 08:33:10 -07:00
2026-03-31 20:43:14 -07:00
2025-07-23 08:15:18 -07:00
2026-02-20 08:13:58 -08:00
2026-03-31 20:43:14 -07:00
2025-07-23 08:15:18 -07:00
2026-03-24 12:31:31 -07:00
2026-04-08 10:19:17 -07:00
2025-09-16 11:37:06 -07:00
2025-08-21 13:46:59 -07:00