diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-09-18 23:53:13 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-09-18 23:53:13 +0300 |
commit | f41c5a5eec6a8fcc2ed683541d50e4bfe0a066ba (patch) | |
tree | b879ccd469ae0387908a8590c647ec9e2a2484f4 /t/t9902-completion.sh | |
parent | 921a713d66acdc90427ab80c4cb039be73b3ae72 (diff) | |
parent | 9f892830d6965d68bfa937cebcfbed9c9e552700 (diff) |
Merge branch 'js/complete-checkout-t'
The completion script (in contrib/) has been taught to treat the
"-t" option to "git checkout" and "git switch" just like the
"--track" option, to complete remote-tracking branches.
* js/complete-checkout-t:
completion(switch/checkout): treat --track and -t the same
Diffstat (limited to 't/t9902-completion.sh')
-rwxr-xr-x | t/t9902-completion.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 8835e16e81..47e20fb8b1 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -1622,14 +1622,22 @@ test_expect_success 'git checkout - with -d, complete only references' ' ' test_expect_success 'git switch - with --track, complete only remote branches' ' - test_completion "git switch --track " <<-\EOF + test_completion "git switch --track " <<-\EOF && + other/branch-in-other Z + other/main-in-other Z + EOF + test_completion "git switch -t " <<-\EOF other/branch-in-other Z other/main-in-other Z EOF ' test_expect_success 'git checkout - with --track, complete only remote branches' ' - test_completion "git checkout --track " <<-\EOF + test_completion "git checkout --track " <<-\EOF && + other/branch-in-other Z + other/main-in-other Z + EOF + test_completion "git checkout -t " <<-\EOF other/branch-in-other Z other/main-in-other Z EOF |