Skip to content

Commit 06674eb

Browse files
committed
Merge branch 'cb/bash-completion-ls-files-processing' into next
Shell completion (in contrib) that gives list of paths have been optimized somewhat. * cb/bash-completion-ls-files-processing: completion: improve ls-files filter performance This fixes #1533 Signed-off-by: Johannes Schindelin <[email protected]>
2 parents 28fdf63 + fe3ef59 commit 06674eb

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

contrib/completion/git-completion.bash

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -388,12 +388,7 @@ __git_index_files ()
388388
local root="${2-.}" file
389389

390390
__git_ls_files_helper "$root" "$1" |
391-
while read -r file; do
392-
case "$file" in
393-
?*/*) echo "${file%%/*}" ;;
394-
*) echo "$file" ;;
395-
esac
396-
done | sort | uniq
391+
cut -f1 -d/ | sort | uniq
397392
}
398393

399394
# Lists branches from the local repository.

0 commit comments

Comments
 (0)