diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-04-25 13:29:02 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-25 13:29:02 +0900 |
commit | 3a940e90d505a3f2ea20e5ebc5b7acad131ad204 (patch) | |
tree | ef6cbbb43157957be682aeb8edc13cf66f650fea /contrib/completion | |
parent | Merge branch 'es/worktree-docs' (diff) | |
parent | completion: improve ls-files filter performance (diff) | |
download | tgif-3a940e90d505a3f2ea20e5ebc5b7acad131ad204.tar.xz |
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
Diffstat (limited to 'contrib/completion')
-rw-r--r-- | contrib/completion/git-completion.bash | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index a757073945..01dd9ff07a 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -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. |