Junio C Hamano <gits...@pobox.com> writes:
> Remi Galan Alfonso <remi.galan-alfo...@ensimag.grenoble-inp.fr>
> writes:
>> Johannes Schindelin <johannes.schinde...@gmx.de> writes:
>>> Hi Rémi,
>>> On Tue, 16 Aug 2016, Remi Galan Alfonso wrote:
>>> > Johannes Schindelin <johannes.schinde...@gmx.de> writes:
>>> > > diff --git a/t/t1350-config-hooks-path.sh b/t/t1350-config-hooks-path.sh
>>> > > index 5e3fb3a..f1f9aee 100755
>>> > > --- a/t/t1350-config-hooks-path.sh
>>> > > +++ b/t/t1350-config-hooks-path.sh
>>> > > @@ -34,4 +34,10 @@ test_expect_success 'Check that various forms of 
>>> > > specifying core.hooksPath work'
>>> > >          test_cmp expect actual
>>> > >  '
>>> > >  
>>> > > +test_expect_success 'git rev-parse --git-path hooks' '
>>> > > +        git config core.hooksPath .git/custom-hooks &&
>>> >
>>> > Any reason to not use 'test_config' here?
>>> Yes: consistency. The rest of the script uses `git config`, not
>>> `test_config`.
>> Fine by me, then. Sorry for the noise.
> No, thanks for reviewing.  I'll take Dscho's patch as-is but once it
> hits 'next', it probably is a good idea to do a separate clean-up
> patch on top to use test_config where necessary.
> Having said that, this entire script is about constantly changing
> the value of that single configuration variable and see how the code
> performs, so any new test added after existing ones is expected to
> ignore left-over values in the variable and set it to a value of its
> own liking.  So I suspect there is no existing "git config" call in
> this script, with or without Dscho's patch, that would benefit from
> getting converted to test_config.

Thanks for checking the ones in this file, considering the lack
of benefits it might not be worth it to change it for now.

I tried to see if the `git config` in other tests were in the
same case or not but the sheer amount made me reconsider. However
taking a look at a couple of random ones, there are some scripts
that would benefit from the conversion.
For example in t3200-branch there is:

    test_expect_success 'git branch with column.*' '
        git config column.ui column &&
        git config column.branch "dense" &&
        COLUMNS=80 git branch >actual &&
        git config --unset column.branch &&
        git config --unset column.ui &&
        cat >expected <<\EOF &&
      a/b/c   bam   foo   l   * master    n     o/p   r
      abc     bar   j/k   m/m   master2   o/o   q
        test_cmp expected actual

The conversion would drop 2 lines in this particular case and
would avoid bleeding the config should `git branch` fail (not
sure how possible that is...).

(I can make a patch for t3200 but that won't be before
days/weeks, so if someone else wants to take care of it I won't

If I have some time to kill, I'll try looking at a few others but
I won't expect that any time soon.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to