diff options
-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. |