Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mingw_rename: support ReFS on Windows 2022 #5515

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

dscho
Copy link
Member

@dscho dscho commented Mar 26, 2025

Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that ERROR_NOT_SUPPORTED is reported (not ERROR_INVALID_PARAMETER, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics.

This fixes #5427

ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not
to support the rename operation using POSIX semantics that Git uses on
Windows as of 391bcea (compat/mingw: support POSIX semantics for
atomic renames, 2024-10-27).

However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance.
This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows
versions would report that do not support POSIX semantics in renames at
all).

Let's handle both errors the same: by falling back to the best-effort
option, namely to rename without POSIX semantics.

This fixes #5427

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho merged commit 4ca71ba into main Mar 26, 2025
170 of 172 checks passed
@dscho dscho deleted the rename-fix-for-win2022-and-refs branch March 26, 2025 12:21
@dscho
Copy link
Member Author

dscho commented Mar 26, 2025

/add relnote bug On Windows Server 2022, Git v2.48.1 introduced a regression where it failed to write files on ReFS drives, which was fixed.

The workflow run was started

github-actions bot pushed a commit to git-for-windows/build-extra that referenced this pull request Mar 26, 2025
On Windows Server 2022, Git v2.48.1 introduced a regression where it
[failed to write files on ReFS
drives](git-for-windows/git#5427), which was
[fixed](git-for-windows/git#5515).

Signed-off-by: gitforwindowshelper[bot] <[email protected]>
git-for-windows-ci pushed a commit that referenced this pull request Mar 26, 2025
Git on Windows 2022 fails to write config files on ReFS with the error
message "Function not implemented". The reason is that
`ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as
expected). Let's handle both errors the same: by falling back to the
best-effort option, namely to rename without POSIX semantics.

This fixes #5427
git-for-windows-ci pushed a commit that referenced this pull request Mar 26, 2025
Git on Windows 2022 fails to write config files on ReFS with the error
message "Function not implemented". The reason is that
`ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as
expected). Let's handle both errors the same: by falling back to the
best-effort option, namely to rename without POSIX semantics.

This fixes #5427
git-for-windows-ci pushed a commit that referenced this pull request Mar 26, 2025
Git on Windows 2022 fails to write config files on ReFS with the error
message "Function not implemented". The reason is that
`ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as
expected). Let's handle both errors the same: by falling back to the
best-effort option, namely to rename without POSIX semantics.

This fixes #5427
dscho added a commit that referenced this pull request Mar 26, 2025
Git on Windows 2022 fails to write config files on ReFS with the error
message "Function not implemented". The reason is that
`ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as
expected). Let's handle both errors the same: by falling back to the
best-effort option, namely to rename without POSIX semantics.

This fixes #5427
git-for-windows-ci pushed a commit that referenced this pull request Mar 28, 2025
Git on Windows 2022 fails to write config files on ReFS with the error
message "Function not implemented". The reason is that
`ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as
expected). Let's handle both errors the same: by falling back to the
best-effort option, namely to rename without POSIX semantics.

This fixes #5427
git-for-windows-ci pushed a commit that referenced this pull request Mar 28, 2025
Git on Windows 2022 fails to write config files on ReFS with the error
message "Function not implemented". The reason is that
`ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as
expected). Let's handle both errors the same: by falling back to the
best-effort option, namely to rename without POSIX semantics.

This fixes #5427
git-for-windows-ci pushed a commit that referenced this pull request Mar 28, 2025
Git on Windows 2022 fails to write config files on ReFS with the error
message "Function not implemented". The reason is that
`ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as
expected). Let's handle both errors the same: by falling back to the
best-effort option, namely to rename without POSIX semantics.

This fixes #5427
git-for-windows-ci pushed a commit that referenced this pull request Mar 29, 2025
Git on Windows 2022 fails to write config files on ReFS with the error
message "Function not implemented". The reason is that
`ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as
expected). Let's handle both errors the same: by falling back to the
best-effort option, namely to rename without POSIX semantics.

This fixes #5427
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to write file: Function not implemented on ReFS file system since version 2.48.1
2 participants