Re: [PATCH v1 3/4] t1301: wrap the statements in the for loop
- From
Jiang Xin <worldhello.net@gmail.com>
- Date
- Nov 28, 2022, 11:56 UTC
- Message-ID
- <CANYiYbEpuPk==QZLAzn0vy_FTr-_8KVnT9zB0as2WZHg2=L2Kw@mail.gmail.com>
- In-Reply-To
- <xmqq35a390ek.fsf@gitster.g>
On Mon, Nov 28, 2022 at 12:19 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 12 quoted lines
> So I am not sure how this patch can be an improvement.
>
> If you wrapped the setting of $x, $y, $u and the config into a
> helper shell function, e.g.
>
> prepare_perm_test_variables () {
> u=$1
> x=...
> y=...
> u=...
> git config core.sharedrepository "$u"
> }I tried, but found the first test case passed, but the other test case in the for loop failed. This is because the variable u is changed twice after prepare_perm_test_variables has been called twice.
So, will drop this patch 3/4.
-- Jiang Xin