diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-02-13 01:21:04 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-02-13 01:21:04 +0300 |
commit | 8b25dee6155fd3816f62649da196a4f42cf5584e (patch) | |
tree | ebf471c8cceee2aeed2e567fb485624a15613a50 /t/t3910-mac-os-precompose.sh | |
parent | 006c5f79be55c029d6f68ea0d5a33cb41d1b5e80 (diff) | |
parent | 5c327502dbf7a27c8784c20037851206a87857c1 (diff) |
Merge branch 'tb/precompose-prefix-too'
When commands are started from a subdirectory, they may have to
compare the path to the subdirectory (called prefix and found out
from $(pwd)) with the tracked paths. On macOS, $(pwd) and
readdir() yield decomposed path, while the tracked paths are
usually normalized to the precomposed form, causing mismatch. This
has been fixed by taking the same approach used to normalize the
command line arguments.
* tb/precompose-prefix-too:
MacOS: precompose_argv_prefix()
Diffstat (limited to 't/t3910-mac-os-precompose.sh')
-rwxr-xr-x | t/t3910-mac-os-precompose.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t3910-mac-os-precompose.sh b/t/t3910-mac-os-precompose.sh index a0b9208ce8..898267a6bd 100755 --- a/t/t3910-mac-os-precompose.sh +++ b/t/t3910-mac-os-precompose.sh @@ -194,6 +194,22 @@ test_expect_failure 'handle existing decomposed filenames' ' test_must_be_empty untracked ' +test_expect_success "unicode decomposed: git restore -p . " ' + DIRNAMEPWD=dir.Odiarnfc && + DIRNAMEINREPO=dir.$Adiarnfc && + export DIRNAMEPWD DIRNAMEINREPO && + git init "$DIRNAMEPWD" && + ( + cd "$DIRNAMEPWD" && + mkdir "$DIRNAMEINREPO" && + cd "$DIRNAMEINREPO" && + echo "Initial" >file && + git add file && + echo "More stuff" >>file && + echo y | git restore -p . + ) +' + # Test if the global core.precomposeunicode stops autosensing # Must be the last test case test_expect_success "respect git config --global core.precomposeunicode" ' |