From: Phillip Wood Date: Tue, 30 Mar 2021 13:53:14 GMT Subject: Re: [PATCH 2/3] rebase tests: use test_unconfig after test_config Message-ID: <53e9be89-db1e-b9ee-e93d-d8c8195480d4@gmail.com> In-Reply-To: <330b33e7a8e87e528aec43c306753cdf573ed8af.1616411973.git.avarab@gmail.com> Hi Ævar On 22/03/2021 11:48, Ævar Arnfjörð Bjarmason wrote: > Fix a test added in 906b63942ac (rebase --am: ignore > rebase.rescheduleFailedExec, 2019-07-01) to reset its config after it > runs. This doesn't matter now since it's the last test in the file, > but will in a subsequent commit where I'll add new tests after this > one. > > Signed-off-by: Ævar Arnfjörð Bjarmason > --- > t/t3418-rebase-continue.sh | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh > index fe407e63cf1..ea14ef496cb 100755 > --- a/t/t3418-rebase-continue.sh > +++ b/t/t3418-rebase-continue.sh > @@ -283,6 +283,7 @@ test_expect_success '--reschedule-failed-exec' ' > ' > > test_expect_success 'rebase.rescheduleFailedExec only affects `rebase -i`' ' > + test_when_finished "test_unconfig rebase.rescheduleFailedExec" && I think test_config adds this test_when_finished line itself. See test-lib-functions.sh: # Set git config, automatically unsetting it after the test is over. test_config () { config_dir= if test "$1" = -C then shift config_dir=$1 shift fi test_when_finished "test_unconfig ${config_dir:+-C '$config_dir'} '$1'" && git ${config_dir:+-C "$config_dir"} config "$@" } Best Wishes Phillip Best Wishes Phillip > test_config rebase.rescheduleFailedExec true && > test_must_fail git rebase -x false HEAD^ && > grep "^exec false" .git/rebase-merge/git-rebase-todo && >