diff options
author | Lessley Dennington <lessleydennington@gmail.com> | 2022-02-07 17:31:45 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-08 10:15:43 -0800 |
commit | 48803821b1712687d6e06e9d7a0e911eabecf4d1 (patch) | |
tree | c27ef270183a0ee6f2cf5953c1933cdf5c5bb34c /builtin/count-objects.c | |
parent | completion: improve sparse-checkout cone mode directory completion (diff) | |
download | tgif-48803821b1712687d6e06e9d7a0e911eabecf4d1.tar.xz |
completion: handle unusual characters for sparse-checkout
Update the __gitcomp_directories method to de-quote and handle unusual
characters in directory names. Although this initially involved an attempt
to re-use the logic in __git_index_files, this method removed
subdirectories (e.g. folder1/0/ became folder1/), so instead new custom
logic was placed directly in the __gitcomp_directories method.
Note there are two tests for this new functionality - one for spaces and
accents and one for backslashes and tabs. The backslashes and tabs test
uses FUNNYNAMES to avoid running on Windows. This is because:
1. Backslashes are explicitly not allowed in Windows file paths.
2. Although tabs appear to be allowed when creating a file in a Windows
bash shell, they actually are not renderable (and appear as empty boxes
in the shell).
Co-authored-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Co-authored-by: Lessley Dennington <lessleydennington@gmail.com>
Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Lessley Dennington <lessleydennington@gmail.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/count-objects.c')
0 files changed, 0 insertions, 0 deletions