Browse Source

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
maint
Junio C Hamano 7 years ago
parent
commit
3a940e90d5
  1. 7
      contrib/completion/git-completion.bash

7
contrib/completion/git-completion.bash

@ -390,12 +390,7 @@ __git_index_files () @@ -390,12 +390,7 @@ __git_index_files ()
local root="${2-.}" file

__git_ls_files_helper "$root" "$1" |
while read -r file; do
case "$file" in
?*/*) echo "${file%%/*}" ;;
*) echo "$file" ;;
esac
done | sort | uniq
cut -f1 -d/ | sort | uniq
}

# Lists branches from the local repository.

Loading…
Cancel
Save