Re: [PATCH 1/5] t3416: set $EDITOR in subshell
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Aug 30, 2022, 15:12 UTC
- Message-ID
- <4bf29cdc-ab03-3fcd-b02d-a9840e07b4f5@gmail.com>
- In-Reply-To
- <20220824222855.1686175-1-jonathantanmy@google.com>
Hi Jonathan
On 24/08/2022 23:28, Jonathan Tan wrote:
Show 25 quoted lines
> Phillip Wood <phillip.wood123@gmail.com> writes: >> Hi Junio >> >> On 15/08/2022 17:53, Junio C Hamano wrote: >>> "Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com> writes: >>> >>>> From: Phillip Wood <phillip.wood@dunelm.org.uk> >>>> >>>> As $EDITOR is exported setting it in one test affects all subsequent >>>> tests. Avoid this by always setting it in a subshell and remove a >>>> couple of unnecessary call to set_fake_editor. >>> >>> Unnecessary because it reuses the one that was established in the >>> previous test [1]? Or unnecessary because we know "rebase -i" would >>> fail even before it gets to the point of asking an editor to tweak >>> the todo sequence [2]? Or something else? >> >> I meant unnecessary as the editor does not change the todo list, but [2] >> also applies. > > Maybe this is moot with the other changes you're planning, but even if > the editor doesn't change the todo list, it's still necessary, right? At > the very least, we need to suppress the default interactive editor and > replace it with one that just reuses the input file without any > modification.
The default GIT_EDITOR when running the test suite is ":" and GIT_SEQUENCE_EDITOR and sequence.editor are unset so we don't need to set an editor in the tests unless we want to change the todo list.
Best Wishes
Phillip