Daniel Shahaf wrote on Thu, Aug 13, 2015 at 23:13:50 +0000: > There are two additional problems in this code, besides the one you are > fixing: > > 1. The second-word-or-later should complete commit ranges or revspecs > too (as in 'git log origin/master origin/foobar'). > > 2. Using __git_cached_files is wrong since it wouldn't complete files > that are in HEAD but not in the index (i.e., any uncommitted 'git rm'). > Patches for these issues two attached. They are to be applied on top of Oliver's patch from this thread. (They conflict textually but should be independent semantically.) > These are preexisting issues: they weren't caused by your patch and > can be fixed independently of it. ... > P.S. There is an asymmetry between __git_tree_files > / __git_cached_files: the former does 'ls-tree' one directory-tree-level > at a time, the latter gets the 'ls -R' output and lets _multi_parts > handle the one-directory-tree-level-at-a-time part. I'm not sure > which approach is better. > > > return ret