git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Firmin Martin <firminmartin24@gmail.com>
Cc: git@vger.kernel.org, Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v2 2/2] t: use test_config whenever possible
Date: Mon, 17 May 2021 15:55:55 +0900	[thread overview]
Message-ID: <xmqqsg2l3l38.fsf@gitster.g> (raw)
In-Reply-To: <87fsylgadx.fsf@Inspiron.i-did-not-set--mail-host-address--so-tickle-me> (Firmin Martin's message of "Mon, 17 May 2021 08:08:42 +0200")

Firmin Martin <firminmartin24@gmail.com> 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.

      reply	other threads:[~2021-05-17  6:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14  6:55 [PATCH 1/2] t/README: document test_config Firmin Martin
2021-05-14  6:55 ` [PATCH 2/2] t: use test_config whenever possible Firmin Martin
2021-05-15 20:15   ` Felipe Contreras
2021-05-15 20:21     ` Felipe Contreras
2021-05-15 22:00       ` Firmin Martin
2021-05-14  7:02 ` [PATCH 1/2] t/README: document test_config Eric Sunshine
2021-05-15 14:43   ` Firmin Martin
2021-05-15 15:27 ` [PATCH v2 0/2] document test_config & use it whenever possible Firmin Martin
2021-05-15 15:27   ` [PATCH v2 1/2] t/README: document test_config Firmin Martin
2021-05-16  5:03     ` Bagas Sanjaya
2021-05-17  7:44       ` Firmin Martin
2021-05-15 15:27   ` [PATCH v2 2/2] t: use test_config whenever possible Firmin Martin
2021-05-16  5:02     ` Junio C Hamano
2021-05-17  6:08       ` Firmin Martin
2021-05-17  6:55         ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqsg2l3l38.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=firminmartin24@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).