Re: [PATCH v4 0/4] fix die_if_checked_out() when ignore_current_worktree
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 25, 2023, 22:50 UTC
- Message-ID
- <xmqqbklhuzq8.fsf@gitster.g>
- In-Reply-To
- <6fed3b1b-1c4e-9298-19b6-7ad9c04c87dd@gmail.com>
Rubén Justo <rjusto@gmail.com> writes:
Show 10 quoted lines
> + test_when_finished " > -+ git worktree remove wt1 && > -+ git worktree remove wt2 && > -+ git branch -d shared > -+ git checkout - > ++ git worktree remove wt1 ||: > ++ git worktree remove wt2 ||: > ++ git checkout - ||: > ++ git branch -D shared ||: > + " &&
Sorry, but I do not get the point of this construct. The test_cleanup variable that accumulates test_when_finished scripts is evaled without -e shopt set, so you can just remove all these ||: and add a single "true" at the end, like
...
git checkout -
git branch -D shared
:
" &&for exactly the same effect, no?