summaryrefslogtreecommitdiffstats
path: root/t/t4013/diff.format-patch_--inline_--stdout_initial..master^
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2026-05-07 12:51:12 +0000
committerJunio C Hamano <gitster@pobox.com>2026-05-08 09:53:12 +0900
commit69ed0e35a7548a17a0fcd79b265a6872bceb2d5d (patch)
tree252b608701b55d6941b36871936839ad0da732d7 /t/t4013/diff.format-patch_--inline_--stdout_initial..master^
parent94f057755b7941b321fd11fec1b2e3ca5313a4e0 (diff)
downloadgit-69ed0e35a7548a17a0fcd79b265a6872bceb2d5d.tar.gz
git-69ed0e35a7548a17a0fcd79b265a6872bceb2d5d.zip
mingw: optionally use legacy (non-POSIX) delete semantics
At some point between Windows 10 Build 17134.1304 and Build 18363.657, the default behavior of `DeleteFileW()` was changed to use POSIX semantics (https://stackoverflow.com/a/60512798). Under those semantics, a file can be deleted even when another process holds an active `MapViewOfFile` view on it: the directory entry is removed immediately, but the underlying data persists until the last handle is closed. On older Windows versions (and Windows 10 builds before that change), `DeleteFileW()` uses legacy semantics where deletion fails outright if any process holds a file mapping. To allow testing code paths that depend on the legacy behavior, introduce a `GIT_TEST_LEGACY_DELETE` environment variable. When set, `mingw_unlink()` uses `SetFileInformationByHandle()` with `FileDispositionInfo` (the non-POSIX variant) instead of `DeleteFileW()`, forcing legacy delete semantics regardless of the Windows version. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.format-patch_--inline_--stdout_initial..master^')
0 files changed, 0 insertions, 0 deletions