path: root/contrib/completion
diff options
authorJunio C Hamano <>2020-04-29 23:15:30 (GMT)
committerJunio C Hamano <>2020-04-29 23:15:31 (GMT)
commit6eacc39b6d2508b6a7522902330c29714c99f5f2 (patch)
treeeb45e53464fed0f3251b6e81d4ea39fc87df3e65 /contrib/completion
parent48eee46d6accbb6ef491f811fd9a9c72843d469b (diff)
parentc0af173a136785b3cfad4bd414b2fb10a130760a (diff)
Merge branch 'en/fill-directory-exponential'
The directory traversal code had redundant recursive calls which made its performance characteristics exponential with respect to the depth of the tree, which was corrected. * en/fill-directory-exponential: completion: fix 'git add' on paths under an untracked directory Fix error-prone fill_directory() API; make it only return matches dir: replace double pathspec matching with single in treat_directory() dir: include DIR_KEEP_UNTRACKED_CONTENTS handling in treat_directory() dir: replace exponential algorithm with a linear one dir: refactor treat_directory to clarify control flow dir: fix confusion based on variable tense dir: fix broken comment dir: consolidate treat_path() and treat_one_path() dir: fix simple typo in comment t3000: add more testcases testing a variety of ls-files issues t7063: more thorough status checking
Diffstat (limited to 'contrib/completion')
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index c21786f..b1d6e5e 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -504,7 +504,7 @@ __git_index_files ()
local root="$2" match="$3"
- __git_ls_files_helper "$root" "$1" "$match" |
+ __git_ls_files_helper "$root" "$1" "${match:-?}" |
awk -F / -v pfx="${2//\\/\\\\}" '{
paths[$1] = 1