diff options
author | Jacob Keller <jacob.keller@gmail.com> | 2020-05-28 11:10:48 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-28 12:57:07 -0700 |
commit | 91439928ecfcb402856dc5dffacdc36ca070d84e (patch) | |
tree | 5716544b26cf8ef683672a0a4f2a3b5be0d8f17e /t/t7412-submodule-absorbgitdirs.sh | |
parent | completion: improve handling of -c/-C and -b/-B in switch/checkout (diff) | |
download | tgif-91439928ecfcb402856dc5dffacdc36ca070d84e.tar.xz |
completion: improve handling of --orphan option of switch/checkout
The --orphan option is used to create a local branch which is detached
from the current history. In git switch, it always resets to the empty
tree, and thus the only completion we can provide is a branch name.
Follow the same rules for -c/-C (and -b/-B) when completing the argument
to --orphan.
In the case of git switch, after we complete the argument, there is
nothing more we can complete for git switch, so do not even try. Nothing
else would be valid.
In the case of git checkout, --orphan takes a start point which it uses
to determine the checked out tree, even though it created orphaned
history.
Update the previously added test cases as they are now passing.
Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7412-submodule-absorbgitdirs.sh')
0 files changed, 0 insertions, 0 deletions