diff options
author | Jacob Keller <jacob.keller@gmail.com> | 2020-05-28 11:10:40 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-28 12:53:24 -0700 |
commit | 0408c6b412a6b6f5fa7d1c33424ef00ad8c93533 (patch) | |
tree | a90019c602672cc4668b6781b234a7ea284d1ab4 /Documentation/git-bundle.txt | |
parent | completion: add tests showing subpar switch/checkout --orphan logic (diff) | |
download | tgif-0408c6b412a6b6f5fa7d1c33424ef00ad8c93533.tar.xz |
completion: replace overloaded track term for __git_complete_refs
The __git_complete_refs uses the "--track" option to specify when to
enable listing of unique remote branches which are used by the DWIM
logic of git checkout and git switch.
Using the term '--track' here is confusing because the git commands
themselves have '--track' as an argument. Additionally, the completion
logic for _git_switch also checks for --track. Keeping the meaning of
track_opt and --track for __git_complete_refs straight from the --track
git switch and git checkout option is difficult when reading this code.
Use the option '--dwim' instead, indicating this is about enabling or
disabling logic related to DWIM mode. Also rename the local variable
track_opt to dwim_opt to further reduce the confusion when reading the
completion code for _git_switch.
Because it is plausible for users to have developed their own
completions which rely on __git_complete_ref, keep --track as a synonym
for --dwim, even though we no longer use it in any of the core git
completion logic. Add a comment explaining why it remains as an
alternative spelling for --dwim.
Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-bundle.txt')
0 files changed, 0 insertions, 0 deletions