diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-08-04 13:28:56 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-08-04 13:28:56 -0700 |
commit | 099a64aa3943ba1eb9e0bd5ea20923820c29c95a (patch) | |
tree | 4ca5ad8fc1b53f38f7ff6f06c195d2128965d60d /t | |
parent | Merge branch 'ar/doc-markup-fix' (diff) | |
parent | mingw: align symlinks-related rmdir() behavior with Linux (diff) | |
download | tgif-099a64aa3943ba1eb9e0bd5ea20923820c29c95a.tar.xz |
Merge branch 'tb/mingw-rmdir-symlink-to-directory'
Windows rmdir() equivalent behaves differently from POSIX ones in
that when used on a symbolic link that points at a directory, the
target directory gets removed, which has been corrected.
* tb/mingw-rmdir-symlink-to-directory:
mingw: align symlinks-related rmdir() behavior with Linux
Diffstat (limited to 't')
-rwxr-xr-x | t/t3400-rebase.sh | 10 | ||||
-rw-r--r-- | t/test-lib.sh | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh index 0bb88aa982..23dbd3c82e 100755 --- a/t/t3400-rebase.sh +++ b/t/t3400-rebase.sh @@ -406,4 +406,14 @@ test_expect_success 'refuse to switch to branch checked out elsewhere' ' test_i18ngrep "already checked out" err ' +test_expect_success MINGW,SYMLINKS_WINDOWS 'rebase when .git/logs is a symlink' ' + git checkout main && + mv .git/logs actual_logs && + cmd //c "mklink /D .git\logs ..\actual_logs" && + git rebase -f HEAD^ && + test -L .git/logs && + rm .git/logs && + mv actual_logs .git/logs +' + test_done diff --git a/t/test-lib.sh b/t/test-lib.sh index da13190970..db61081d6b 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -1545,6 +1545,12 @@ test_lazy_prereq SYMLINKS ' ln -s x y && test -h y ' +test_lazy_prereq SYMLINKS_WINDOWS ' + # test whether symbolic links are enabled on Windows + test_have_prereq MINGW && + cmd //c "mklink y x" &> /dev/null && test -h y +' + test_lazy_prereq FILEMODE ' test "$(git config --bool core.filemode)" = true ' |