All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH] t7817: do not depend on any specific default branch name
Date: Fri, 04 Dec 2020 21:06:21 +0000	[thread overview]
Message-ID: <pull.808.git.1607115981367.gitgitgadget@gmail.com> (raw)

From: Johannes Schindelin <johannes.schindelin@gmx.de>

Elsewhere, we introduced support to override the default branch name in
the tests via `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME`. Therefore, we
should avoid expecting a particular hard-coded name in test scripts.

So let's rename the initial branch immediately to `main` and work with
that.

This avoids breakages in t7817 when the default branch name is changed.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
    t7817: do not depend on any specific default branch name
    
    This should fix the CI build of seen with regard to t7817. The patch is
    designed to be applied on top of mt/grep-sparse-checkout.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-808%2Fdscho%2Ft7817-and-the-default-branch-name-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-808/dscho/t7817-and-the-default-branch-name-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/808

 t/t7817-grep-sparse-checkout.sh | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/t/t7817-grep-sparse-checkout.sh b/t/t7817-grep-sparse-checkout.sh
index f93a4f71d1..d9d32c6435 100755
--- a/t/t7817-grep-sparse-checkout.sh
+++ b/t/t7817-grep-sparse-checkout.sh
@@ -77,7 +77,8 @@ test_expect_success 'setup' '
 	test_path_is_missing sub/A &&
 	test_path_is_file a &&
 	test_path_is_file sub/B/b &&
-	test_path_is_file sub2/a
+	test_path_is_file sub2/a &&
+	git branch -m main
 '
 
 # The two tests below check a special case: the sparsity patterns exclude '/b'
@@ -110,12 +111,12 @@ test_expect_success 'grep unmerged file despite not matching sparsity patterns'
 	b:modified-b-in-branchY
 	EOF
 	test_when_finished "test_might_fail git merge --abort && \
-			    git checkout master" &&
+			    git checkout main" &&
 
 	git sparse-checkout disable &&
-	git checkout -b branchY master &&
+	git checkout -b branchY main &&
 	test_commit modified-b-in-branchY b &&
-	git checkout -b branchX master &&
+	git checkout -b branchX main &&
 	test_commit modified-b-in-branchX b &&
 
 	git sparse-checkout init &&

base-commit: aaff72b8c3e3d95917f3432396073a7708b16a90
-- 
gitgitgadget

                 reply	other threads:[~2020-12-04 21:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=pull.808.git.1607115981367.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.