Re: [PATCH v3] ls-files.c: add --dedup option
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jan 18, 2021, 14:59 UTC
- Message-ID
- <CAPig+cRtpm=68GmHc_zjGaFX0q098-EpNfGH3AAk4uJfK7QH_w@mail.gmail.com>
- In-Reply-To
- <xmqqo8hnkvwo.fsf@gitster.c.googlers.com>
On Sun, Jan 17, 2021 at 6:04 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 18 quoted lines
> Eric Sunshine <sunshine@sunshineco.com> writes: > > On Sat, Jan 16, 2021 at 10:48 PM 胡哲宁 <adlternative@gmail.com> wrote: > >> Eric Sunshine <sunshine@sunshineco.com> 于2021年1月16日周六 下午3:13写道: > >> > test_when_finished "git switch master" && > >> > > >> > Or you could use `git switch -` if you don't want to hard-code the > >> > name "master" in the test (since there has been effort lately to > >> > remove that name from tests. > >> > > >> I have little confuse about I can use` test_when_finished "git switch master" `, > >> but I can't use` test_when_finished "git switch -" `, > >> why? > > > > You may use either one. I presented both as alternative approaches. > > I am sensing a bit of miscommunication here. You sound like you > still believe either would work OK, but to me, it sounds like that > the author claims the one of them does not work for him/her.
That could be. My eye glided over the code too quickly to notice that it was using `git checkout HEAD~` followed immediately by `git switch -c dev`, which means that `git switch -` would indeed not return to "master" (in fact, it errors out).