Skip to content

Commit 3a940e9

Browse files
committed
Merge branch 'cb/bash-completion-ls-files-processing'
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
2 parents 6b747fc + 78a2d21 commit 3a940e9

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
@@ -390,12 +390,7 @@ __git_index_files ()
390390
local root="${2-.}" file
391391

392392
__git_ls_files_helper "$root" "$1" |
393-
while read -r file; do
394-
case "$file" in
395-
?*/*) echo "${file%%/*}" ;;
396-
*) echo "$file" ;;
397-
esac
398-
done | sort | uniq
393+
cut -f1 -d/ | sort | uniq
399394
}
400395

401396
# Lists branches from the local repository.

0 commit comments

Comments
 (0)