Re: [PATCH v2 1/2] t3418: add testcase showing problems with rebase -i and strategy options
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Jun 27, 2018, 18:17 UTC
- Message-ID
- <eb66b6da-a306-3f65-abf3-9b845fba32cd@kdbg.org>
- In-Reply-To
- <CABPp-BEYbC0C+bczQuNTcC_jxVM59czh7HTpqi9dv09fvCjMrA@mail.gmail.com>
Am 27.06.2018 um 19:27 schrieb Elijah Newren:
Show 13 quoted lines
> On Wed, Jun 27, 2018 at 9:54 AM, Junio C Hamano <gitster@pobox.com> wrote: >> Having said that, it would be simpler for at least the latter to >> write it using a single-shot environment assignment, perhaps? I.e. >> >> PATH=./test-bin:$PATH git rebase --continue && >> >> without running in a subshell? > > Seems reasonable. Since these tests were essentially copies of other > tests within the same file, just for rebase -i instead of -m, should I > also add another patch to the series fixing up the rebase -m testcase > to also replace the subshell with a single-shot environment > assignment?
Pitfalls ahead!
PATH=... git rebase ...
is OK, but
PATH=... test_must_fail git rebase ...
is not; the latter requires the subshell, otherwise the modified PATH variable survives the command because test_must_fail is a shell function. Yes, it's silly, but that's how it is.
-- Hannes