test-drop-caches: simplify delay loading of NtSetSystemInformation
[gitweb.git] / contrib / completion / git-completion.bash
index a7570739454ac793430b7f0edb8ba229f3ff50d8..01dd9ff07a20b7e885e8cfeba08ce7a2fecbbe02 100644 (file)
@@ -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.