Skip to content

completion of 'git [-C <dir>] checkout'

Junio C Hamano git 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 1 replyIn review
  2. v23 patches 2 repliesSuperseded
  3. v12 patches 5 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3completion: no-op refactoring of checkout completioncontrib/completion/git-completion.bash+43 -410 replies
2/3completion: complete tracked paths for "git checkout"contrib/completion/git-completion.bash t/t9902-completion.sh+43 -00 replies
3/3completion: 'git checkout' completes untracked paths as a last resortcontrib/completion/git-completion.bash t/t9902-completion.sh+23 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/3] completion of 'git [-C <dir>] checkout'

Continuing from the previous 'git [-C <dir>] diff' series, these patches correct completion for 'git checkout [-C <dir>] path<TAB>', 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
      }
Signature · 1 line
2.55.0-759-g9dcc51a0fd