Message ID | pull.1864.git.1740139296483.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | compat/mingw: rename the symlink, not the target | expand |
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes: > This contribution just came in as a Git for Windows Pull Request. > > Granted, I have not yet managed to find time to upstream support for > symbolic links (it is in the pipeline: > https://github.com/dscho/git/tree/support-symlinks-on-windows), but this > patch still should be in upstream Git because there are other ways to > create symbolic links than by using Git. Thanks, let me mark it for 'next' immediately.
diff --git a/compat/mingw.c b/compat/mingw.c index 1d5b211b548..f524c54d06d 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -2278,7 +2278,9 @@ repeat: old_handle = CreateFileW(wpold, DELETE, FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE, - NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); + NULL, OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, + NULL); if (old_handle == INVALID_HANDLE_VALUE) { errno = err_win_to_posix(GetLastError()); return -1;