Re: [PATCH v2 2/2] t: use test_config whenever possible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Firmin Martin <firminmartin24@xxxxxxxxx> writes:

> fact, I suspect that you misread the diff, cf. the end of the email). 
> I copy here the full test with line number to make sure that we are in
> the same page.

The following is the original test before your patch, right?

>>  415 test_expect_success "'fetch.recurseSubmodules=on-demand' overrides global config" '
>>  416     (
>>  417         cd downstream &&
>>  418         git fetch --recurse-submodules
>>  419     ) &&
>>  420     add_upstream_commit &&
>>  421     git config --global fetch.recurseSubmodules false &&
>>  422     head1=$(git rev-parse --short HEAD) &&
>>  423     git add submodule &&
>>  424     git commit -m "new submodule" &&
>>  425     head2=$(git rev-parse --short HEAD) &&
>>  426     echo "From $pwd/." > expect.err.2 &&
>>  427     echo "   $head1..$head2  super      -> origin/super" >>expect.err.2 &&
>>  428     head -3 expect.err >> expect.err.2 &&
>>  429     (
>>  430         cd downstream &&
>>  431         git config fetch.recurseSubmodules on-demand &&
>>  432         git fetch >../actual.out 2>../actual.err

Here we run one "fetch" inside downstream, with a config specific to
the downstream repository; the expectation is that this on-demand
setting is honored, overriding the "global" setting that was set on
line 421.

>>  433     ) &&
>>  434     git config --global --unset fetch.recurseSubmodules &&

And then we discard the "global" setting.

>>  435     (
>>  436         cd downstream &&
>>  437         git config --unset fetch.recurseSubmodules

Oh, I thought I saw there was another fetch before this unset
between 436 and 437, that writes to the same actual.out and
actual.err.

> At this point, I have the feeling that you have misread the diff
> (do correct me If I'm wrong) and saw ...
>>  (
>>      cd downstream &&
>>      git config fetch.recurseSubmodules on-demand &&
>>      git fetch >../actual.out 2>../actual.err
>>  ) &&
>>  git config --global --unset fetch.recurseSubmodules &&
>>  (
>>      cd downstream &&
>>      git fetch >../actual.out 2>../actual.err
>>      git config --unset fetch.recurseSubmodules
>>  ) &&

Exactly.  Thanks and sorry for the noise.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux