summaryrefslogtreecommitdiff
path: root/contrib/completion/git-completion.tcsh
diff options
context:
space:
mode:
authorJacob Keller <jacob.keller@gmail.com>2020-05-28 18:10:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-05-28 19:57:07 (GMT)
commit91439928ecfcb402856dc5dffacdc36ca070d84e (patch)
tree5716544b26cf8ef683672a0a4f2a3b5be0d8f17e /contrib/completion/git-completion.tcsh
parentacb658fe7d6bc11136be0756270fda675af74761 (diff)
downloadgit-91439928ecfcb402856dc5dffacdc36ca070d84e.zip
git-91439928ecfcb402856dc5dffacdc36ca070d84e.tar.gz
git-91439928ecfcb402856dc5dffacdc36ca070d84e.tar.bz2
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 'contrib/completion/git-completion.tcsh')
0 files changed, 0 insertions, 0 deletions