From: Junio C Hamano Date: Thu, 13 Aug 2026 19:12:31 GMT Subject: [PATCH v3 0/3] completion of 'git [-C ] checkout' Message-ID: <20260813191234.1066662-1-gitster@pobox.com> In-Reply-To: Continuing from the previous 'git [-C ] diff' series, these patches correct completion for 'git checkout [-C ] path', with a fallback to complete untracked paths of somewhat dubious value, primarily as a reminder for future work. Hopefully this will be the small and final update to the series. 1/3: completion: no-op refactoring of checkout completion 2/3: completion: complete tracked paths for "git checkout" 3/3: completion: 'git checkout' completes untracked paths as a last resort contrib/completion/git-completion.bash | 88 ++++++++++++++------------ t/t9902-completion.sh | 56 ++++++++++++++++ 2 files changed, 105 insertions(+), 39 deletions(-) Range-diff against v2: 1: 33d136ffde = 1: 33d136ffde completion: no-op refactoring of checkout completion 2: a28754cfd9 = 2: a28754cfd9 completion: complete tracked paths for "git checkout" 3: 90aec6539c ! 3: 17880068c0 completion: 'git checkout' completes untracked paths as a last resort @@ contrib/completion/git-completion.bash: _git_checkout () fi + + if [ ${#COMPREPLY[@]} -eq 0 ]; then -+ __git_complete_index_file "--others" ++ __git_complete_index_file "--others --directory" + fi } -- 2.55.0-759-g9dcc51a0fd