From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> To: git@vger.kernel.org Cc: "Junio C Hamano" <gitster@pobox.com>, "Johannes Schindelin" <johannes.schindelin@gmx.de>, "Jeff King" <peff@peff.net>, "Felipe Contreras" <felipe.contreras@gmail.com>, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Subject: [PATCH v2 28/27] tests: run tests omitted by PREPARE_FOR_MAIN_BRANCH Date: Wed, 18 Nov 2020 12:48:34 +0100 [thread overview] Message-ID: <20201118114834.11137-1-avarab@gmail.com> (raw) In-Reply-To: <pull.762.v2.git.1605629547.gitgitgadget@gmail.com> Reinstate the test coverage lost due to PREPARE_FOR_MAIN_BRANCH. The remaining impact of that prerequisite was mainly missing coverage from submodule fetches being lost[1], e.g. impacting my in-flight ab/retire-parse-remote. Now the prerequisite is effectively a noop. This goes on top of [2]. I'm not removing the PREPARE_FOR_MAIN_BRANCH prerequisite to keep this change small, instead it's now effectively a noop. It can be removed in some later change. The only remaining occurrences in t5526-fetch-submodules.sh can be removed without breakage with: perl -pi -e 's/PREPARE_FOR_MAIN_BRANCH //g' t/t5526-fetch-submodules.sh Which at this point leaves only the now-unused prerequisite declaration in test-lib.sh. The coverage in t9902-completion.sh was restored by partially reverting[3]. After that we were left with one test in a mixed state. It setup "master" but tested for "mai". Change it back to "mas", pending a more complete refactoring of that test. This change only conflicts between next..seen by clashing with Peter Kaestle's in-flights submodule fix[4]. Fixing the resulting logic error in t5526-fetch-submodules.sh is trivial, simply: - compare_refs_in_dir A origin/master B origin/master + compare_refs_in_dir A origin/main B origin/main 1. 66713e84e7 ("tests: prepare aligned mentions of the default branch name", 2020-10-23) 2. https://public-inbox.org/git/pull.762.v2.git.1605629547.gitgitgadget@gmail.com/ 3. 8164360fc8 ("t9902: prepare a test for the upcoming default branch name", 2020-10-23) 4. https://public-inbox.org/git/1605196853-37359-1-git-send-email-peter.kaestle@nokia.com/ Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- On Tue, Nov 17 2020, Johannes Schindelin via GitGitGadget wrote: > To avoid even more conflicts with topics that did not even make it to seen > yet, this patch series specifically excludes t3404, t4013, t5310, t5526, > t6300, t7064, t7817, t9902: in those test scripts, we will still use master > for the time being. Once the topics in question have settled, I will send > the appropriate follow-up patches to adjust them to use main instead. This is not a replacement for that subsequent cleanup, but seems like a simple enough thing to have now to reinstate the missing test coverage. Perhaps there's some topics not in "seen" that you have in mind as conflicting, but as noted above the conflict produced here with in-flight in "seen" is trivial. Seems worth having that sooner than later if Junio's willing juggle that. t/t5526-fetch-submodules.sh | 6 +++--- t/t9902-completion.sh | 6 +++--- t/test-lib.sh | 9 +++------ 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh index dd8e423d25..f45ba02b8a 100755 --- a/t/t5526-fetch-submodules.sh +++ b/t/t5526-fetch-submodules.sh @@ -481,7 +481,7 @@ test_expect_success PREPARE_FOR_MAIN_BRANCH "don't fetch submodule when newly re test_i18ncmp expect.err actual.err && ( cd submodule && - git checkout -q master + git checkout -q main ) ' @@ -663,9 +663,9 @@ test_expect_success 'fetch new submodule commits on-demand without .gitmodules e git config -f .gitmodules --remove-section submodule.sub1 && git add .gitmodules && git commit -m "delete gitmodules file" && - git checkout -B master && + git checkout -B main && git -C downstream fetch && - git -C downstream checkout origin/master && + git -C downstream checkout origin/main && C=$(git -C submodule commit-tree -m "yet another change outside refs/heads" HEAD^{tree}) && git -C submodule update-ref refs/changes/7 $C && diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 5c01c75d40..3696b85acb 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -1055,13 +1055,13 @@ test_expect_success 'teardown after filtering matching refs' ' git -C otherrepo branch -D matching/branch-in-other ' -test_expect_success PREPARE_FOR_MAIN_BRANCH '__git_refs - for-each-ref format specifiers in prefix' ' +test_expect_success '__git_refs - for-each-ref format specifiers in prefix' ' cat >expected <<-EOF && evil-%%-%42-%(refname)..master EOF ( - cur="evil-%%-%42-%(refname)..mai" && - __git_refs "" "" "evil-%%-%42-%(refname).." mai >"$actual" + cur="evil-%%-%42-%(refname)..mas" && + __git_refs "" "" "evil-%%-%42-%(refname).." mas >"$actual" ) && test_cmp expected "$actual" ' diff --git a/t/test-lib.sh b/t/test-lib.sh index d39bdf04ce..ed489b2213 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -257,7 +257,7 @@ case "$TRASH_DIRECTORY" in esac case "$TEST_NUMBER" in -3404|4013|5310|5526|6300|7064|7817|9902) +3404|4013|5310|6300|7064|7817|9902) # Avoid conflicts with patch series that are cooking at the same time # as the patch series changing the default of `init.defaultBranch`. GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master @@ -1725,12 +1725,9 @@ test_lazy_prereq REBASE_P ' test -z "$GIT_TEST_SKIP_REBASE_P" ' -# Special-purpose prereq for transitioning to a new default branch name: -# Some tests need more than just a mindless (case-preserving) s/master/main/g -# replacement. The non-trivial adjustments are guarded behind this -# prerequisite, acting kind of as a feature flag +# Obsolete, do not use, removed soon! test_lazy_prereq PREPARE_FOR_MAIN_BRANCH ' - test "$GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME" = main + test "$TEST_NAME" = "t5526-fetch-submodules" ' # Ensure that no test accidentally triggers a Git command -- 2.29.2.222.g5d2a92d10f8
next prev parent reply other threads:[~2020-11-18 11:48 UTC|newest] Thread overview: 163+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-12 22:43 [PATCH 00/28] Use main as default branch name Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 01/28] t0060: preemptively adjust alignment Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 02/28] t[01]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 03/28] t2*: " Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 04/28] t3[0-3]*: " Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 05/28] t3416: preemptively adjust alignment in a comment Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 06/28] t34*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 07/28] t3[5-9]*: " Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 08/28] t4*: " Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 09/28] t5323: prepare centered comment for `master` -> `main` Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 10/28] t5[0-4]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 11/28] t5503: prepare aligned comment for replacing `master` with `main` Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 12/28] t550*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 13/28] t551*: " Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 14/28] t55[23]*: " Johannes Schindelin via GitGitGadget 2020-11-13 10:02 ` Ævar Arnfjörð Bjarmason 2020-11-13 14:18 ` Johannes Schindelin 2020-11-16 20:07 ` Junio C Hamano 2020-11-12 22:43 ` [PATCH 15/28] t55[4-9]*: " Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 16/28] t5[6-9]*: " Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 17/28] t6[0-3]*: " Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 18/28] t64*: preemptively adjust alignment to prepare for `master` -> `main` Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 19/28] t6[4-9]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 20/28] t7[0-4]*: " Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 21/28] t7[5-9]*: " Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 22/28] t8*: " Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 23/28] t9[0-4]*: " Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 24/28] t9[5-7]*: " Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 25/28] tests(git-p4): transition to the default branch name `main` Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 26/28] t99*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 27/28] tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed Johannes Schindelin via GitGitGadget 2020-11-12 22:43 ` [PATCH 28/28] Change the default branch name to `main` Don Goodman-Wilson via GitGitGadget 2020-11-13 9:57 ` Ævar Arnfjörð Bjarmason 2020-11-13 14:09 ` Johannes Schindelin 2020-11-16 20:04 ` Junio C Hamano 2020-11-13 0:11 ` [PATCH 00/28] Use main as default branch name Felipe Contreras 2020-11-13 12:55 ` Ævar Arnfjörð Bjarmason 2020-11-13 14:22 ` Johannes Schindelin 2020-11-13 16:13 ` [RFC/PATCH] tests: support testing with an arbitrary default branch (sort of) Ævar Arnfjörð Bjarmason 2020-11-13 19:14 ` Jeff King 2020-11-13 22:00 ` Johannes Schindelin 2020-11-13 22:39 ` Johannes Schindelin 2020-11-13 23:49 ` Ævar Arnfjörð Bjarmason [not found] ` <nycvar.QRO.7.76.6.2011162118060.18437@tvgsbejvaqbjf.bet> 2020-11-18 13:32 ` Ævar Arnfjörð Bjarmason 2020-11-18 14:16 ` Felipe Contreras 2020-11-20 11:36 ` Ævar Arnfjörð Bjarmason 2020-11-20 16:00 ` Felipe Contreras 2020-11-18 15:56 ` Junio C Hamano 2020-11-19 9:32 ` Johannes Schindelin 2020-11-19 19:35 ` Junio C Hamano 2020-11-22 19:07 ` Johannes Schindelin 2020-11-19 10:46 ` Johannes Schindelin 2020-11-14 0:25 ` Felipe Contreras 2020-11-13 17:42 ` [PATCH 00/28] Use main as default branch name Felipe Contreras 2020-11-14 6:13 ` Junio C Hamano 2020-11-16 19:52 ` Junio C Hamano 2020-11-17 16:10 ` Johannes Schindelin 2020-11-17 19:09 ` Junio C Hamano 2020-11-18 20:58 ` Johannes Schindelin 2020-11-17 16:12 ` [PATCH v2 00/27] tests: use " Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 01/27] t0060: preemptively adjust alignment Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 02/27] t[01]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 03/27] t2*: " Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 04/27] t3[0-3]*: " Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 05/27] t3416: preemptively adjust alignment in a comment Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 06/27] t34*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 07/27] t3[5-9]*: " Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 08/27] t4*: " Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 09/27] t5323: prepare centered comment for `master` -> `main` Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 10/27] t5[0-4]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 11/27] t5503: prepare aligned comment for replacing `master` with `main` Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 12/27] t550*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 13/27] t551*: " Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 14/27] t55[23]*: " Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 15/27] t55[4-9]*: " Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 16/27] t5[6-9]*: " Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 17/27] t6[0-3]*: " Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 18/27] t64*: preemptively adjust alignment to prepare for `master` -> `main` Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 19/27] t6[4-9]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 20/27] t7[0-4]*: " Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 21/27] t7[5-9]*: " Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 22/27] t8*: " Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 23/27] t9[0-4]*: " Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 24/27] t9[5-7]*: " Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 25/27] tests(git-p4): transition to the default branch name `main` Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 26/27] t99*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-17 16:12 ` [PATCH v2 27/27] tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed Johannes Schindelin via GitGitGadget 2020-11-18 11:48 ` Ævar Arnfjörð Bjarmason [this message] 2020-11-18 23:56 ` [PATCH v2 28/27] tests: run tests omitted by PREPARE_FOR_MAIN_BRANCH Johannes Schindelin 2020-11-19 19:30 ` Junio C Hamano 2020-11-20 13:09 ` Johannes Schindelin 2020-11-20 18:08 ` Junio C Hamano 2020-11-18 23:44 ` [PATCH v3 00/28] tests: use main as default branch name Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 01/28] tests: mark tests relying on the current default for `init.defaultBranch` Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 02/28] t0060: preemptively adjust alignment Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 03/28] t[01]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 04/28] t2*: " Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 05/28] t3[0-3]*: " Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 06/28] t3416: preemptively adjust alignment in a comment Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 07/28] t34*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 08/28] t3[5-9]*: " Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 09/28] t4*: " Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 10/28] t5323: prepare centered comment for `master` -> `main` Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 11/28] t5[0-4]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 12/28] t5503: prepare aligned comment for replacing `master` with `main` Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 13/28] t550*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 14/28] t551*: " Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 15/28] t55[23]*: " Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 16/28] t55[4-9]*: " Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 17/28] t5[6-9]*: " Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 18/28] t6[0-3]*: " Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 19/28] t64*: preemptively adjust alignment to prepare for `master` -> `main` Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 20/28] t6[4-9]*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 21/28] t7[0-4]*: " Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 22/28] t7[5-9]*: " Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 23/28] t8*: " Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 24/28] t9[0-4]*: " Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 25/28] t9[5-7]*: " Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 26/28] tests(git-p4): transition to the default branch name `main` Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 27/28] t99*: adjust the references to the default branch name "main" Johannes Schindelin via GitGitGadget 2020-11-18 23:44 ` [PATCH v3 28/28] tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed Johannes Schindelin via GitGitGadget 2020-11-19 23:35 ` [PATCH v3 00/28] tests: use main as default branch name Junio C Hamano 2020-11-17 20:48 ` [PATCH 00/28] Use " Eric W. Biederman 2020-11-17 22:47 ` Felipe Contreras 2020-11-17 23:33 ` Jeff King 2020-11-18 0:07 ` Junio C Hamano 2020-11-18 1:25 ` Jeff King 2020-11-18 2:40 ` Jonathan Nieder 2020-11-18 5:43 ` Junio C Hamano 2020-11-18 11:32 ` Johannes Schindelin 2020-11-18 15:43 ` Junio C Hamano 2020-11-19 9:22 ` Johannes Schindelin 2020-11-18 0:18 ` Felipe Contreras 2020-11-18 1:22 ` Jeff King 2020-11-18 1:45 ` Felipe Contreras 2020-11-18 2:06 ` Jeff King 2020-11-18 2:39 ` Jonathan Nieder 2020-11-18 10:12 ` Felipe Contreras 2020-11-18 9:04 ` Felipe Contreras 2020-11-17 22:55 ` Junio C Hamano 2020-11-17 23:16 ` Felipe Contreras 2020-11-18 0:10 ` Junio C Hamano 2020-11-18 0:51 ` Felipe Contreras 2020-11-18 23:45 ` Philip Oakley 2020-11-19 0:00 ` Johannes Schindelin 2020-11-19 0:30 ` Philip Oakley 2020-11-19 0:30 ` Peter Hadlaw 2020-11-19 0:44 ` Philip Oakley 2020-11-19 0:55 ` Peter Hadlaw 2020-11-19 1:51 ` Junio C Hamano 2020-11-19 10:35 ` Philip Oakley 2020-11-19 11:10 ` Sergey Organov 2020-11-19 11:50 ` Philip Oakley 2020-11-19 12:33 ` Sergey Organov 2020-11-21 23:01 ` Junio C Hamano 2020-11-22 10:21 ` Sergey Organov 2020-11-22 11:20 ` Philip Oakley 2020-11-22 13:23 ` Sergey Organov 2020-11-22 20:18 ` Philip Oakley 2020-11-22 21:56 ` Felipe Contreras 2020-11-22 23:54 ` Junio C Hamano 2020-11-18 2:56 ` Jonathan Nieder 2020-11-18 5:57 ` Junio C Hamano
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 * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201118114834.11137-1-avarab@gmail.com \ --to=avarab@gmail.com \ --cc=felipe.contreras@gmail.com \ --cc=git@vger.kernel.org \ --cc=gitster@pobox.com \ --cc=johannes.schindelin@gmx.de \ --cc=peff@peff.net \ --subject='Re: [PATCH v2 28/27] tests: run tests omitted by PREPARE_FOR_MAIN_BRANCH' \ /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
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 NNTP newsgroup(s).