Re: [PATCH] completion(switch/checkout): treat --track and -t the same
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Sep 10, 2023, 08:22 UTC
- Message-ID
- <4f7d166c-040e-eb7c-ef27-81f9748d44a0@gmx.de>
- In-Reply-To
- <ZPtISYVufU0MazO_@pobox.com>
Hi Todd,
On Fri, 8 Sep 2023, Todd Zullinger wrote:
Show 17 quoted lines
> Junio C Hamano wrote: > > "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> > > writes: > >> diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh > >> index 8835e16e811..df8bc44c285 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 && > > Is this new leading ":" intended? It looks out of place > (though perhaps I just don't unerstand the context well > enough).
Thanks for catching this. It is a debugging left-over, when I wanted to make sure that the `-t` validation I added would run immediately.
I see that Junio helpfully dropped it before merging down to `next`, so I will refrain from sending a v2.
Ciao, Johannes
Show 15 quoted lines
> > >> + 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 > >> ' > > > > So, this demonstrates that '-t' behaves the same way as '--track'. > > -- > Todd >