summaryrefslogtreecommitdiff
path: root/builtin/commit-graph.c
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2023-12-03 05:57:03 +0000
committerJunio C Hamano <gitster@pobox.com>2023-12-03 15:25:14 +0900
commit7c3595b6132c048916df77107ef87f8d3b4f9a42 (patch)
treef04cddad29901e2bcde088f12e87567e277dedfd /builtin/commit-graph.c
parent253eeaf7a2bc93285b55e2be8aa15f27cd11858e (diff)
completion: avoid misleading completions in cone mode
The "set" and "add" subcommands of "sparse-checkout", when in cone mode, should only complete on directories. For bash_completion in general, when no completions are returned for any subcommands, it will often fall back to standard completion of files and directories as a substitute. That is not helpful here. Since we have already looked for all valid completions, if none are found then falling back to standard bash file and directory completion is at best actively misleading. In fact, there are three different ways it can be actively misleading. Add a long comment in the code about how that fallback behavior can deceive, and disable the fallback by returning a fake result as the sole completion. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions