summaryrefslogtreecommitdiff
path: root/t/t9902-completion.sh
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2018-04-16 22:41:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-17 03:49:36 (GMT)
commit3dfe23ba51664467d89ba937e607ffef6501c3f3 (patch)
tree2c468eeab3f1d6477045eda560b595d853939ab7 /t/t9902-completion.sh
parent6bf0ced4e21bfc757641ec537b8bb9dd63ece904 (diff)
downloadgit-3dfe23ba51664467d89ba937e607ffef6501c3f3.zip
git-3dfe23ba51664467d89ba937e607ffef6501c3f3.tar.gz
git-3dfe23ba51664467d89ba937e607ffef6501c3f3.tar.bz2
completion: support completing non-ASCII pathnames
Unless the user has 'core.quotePath=false' somewhere in the configuration, both 'git ls-files' and 'git diff-index' will by default quote any pathnames that contain bytes with values higher than 0x80, and escape those bytes as '\nnn' octal values. This prevents completing paths when the current path component to be completed contains any non-ASCII, most notably UTF-8, characters, because none of the listed quoted paths will match the current word on the command line. Set 'core.quotePath=false' for those 'git ls-files' and 'git diff-index' invocations, so they won't consider bytes higher than 0x80 as "unusual", and won't quote pathnames containing such characters. Note that pathnames containing backslash, double quote, or control characters will still be quoted; a later patch in this series will deal with those. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9902-completion.sh')
-rwxr-xr-xt/t9902-completion.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index 98a672c..f7d7bec 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -1463,7 +1463,7 @@ test_expect_failure 'complete files - quoted characters on cmdline' '
"New(Dir/New)File.c"
'
-test_expect_failure 'complete files - UTF-8 in ls-files output' '
+test_expect_success 'complete files - UTF-8 in ls-files output' '
test_when_finished "rm -r árvíztűrő" &&
mkdir árvíztűrő &&
>"árvíztűrő/Сайн яваарай" &&