{"thread":{"id":"54765","subject":"[PATCH] t7817: do not depend on any specific default branch name","startedAt":"2020-12-04T21:07:14Z","lastAt":"2020-12-04T21:07:14Z","messageCount":1,"participants":["Johannes Schindelin via GitGitGadget"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"411404","messageId":"pull.808.git.1607115981367.gitgitgadget@gmail.com","threadId":"54765","inReplyTo":null,"subject":"[PATCH] t7817: do not depend on any specific default branch name","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-12-04T21:06:21Z","receivedAt":"2020-12-04T21:07:14Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nElsewhere, we introduced support to override the default branch name in\nthe tests via `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME`. Therefore, we\nshould avoid expecting a particular hard-coded name in test scripts.\n\nSo let's rename the initial branch immediately to `main` and work with\nthat.\n\nThis avoids breakages in t7817 when the default branch name is changed.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n    t7817: do not depend on any specific default branch name\n    \n    This should fix the CI build of seen with regard to t7817. The patch is\n    designed to be applied on top of mt/grep-sparse-checkout.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-808%2Fdscho%2Ft7817-and-the-default-branch-name-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-808/dscho/t7817-and-the-default-branch-name-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/808\n\n t/t7817-grep-sparse-checkout.sh | 9 +++++----\n 1 file changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t7817-grep-sparse-checkout.sh b/t/t7817-grep-sparse-checkout.sh\nindex f93a4f71d1..d9d32c6435 100755\n--- a/t/t7817-grep-sparse-checkout.sh\n+++ b/t/t7817-grep-sparse-checkout.sh\n@@ -77,7 +77,8 @@ test_expect_success 'setup' '\n \ttest_path_is_missing sub/A &&\n \ttest_path_is_file a &&\n \ttest_path_is_file sub/B/b &&\n-\ttest_path_is_file sub2/a\n+\ttest_path_is_file sub2/a &&\n+\tgit branch -m main\n '\n \n # The two tests below check a special case: the sparsity patterns exclude '/b'\n@@ -110,12 +111,12 @@ test_expect_success 'grep unmerged file despite not matching sparsity patterns'\n \tb:modified-b-in-branchY\n \tEOF\n \ttest_when_finished \"test_might_fail git merge --abort && \\\n-\t\t\t    git checkout master\" &&\n+\t\t\t    git checkout main\" &&\n \n \tgit sparse-checkout disable &&\n-\tgit checkout -b branchY master &&\n+\tgit checkout -b branchY main &&\n \ttest_commit modified-b-in-branchY b &&\n-\tgit checkout -b branchX master &&\n+\tgit checkout -b branchX main &&\n \ttest_commit modified-b-in-branchX b &&\n \n \tgit sparse-checkout init &&\n\nbase-commit: aaff72b8c3e3d95917f3432396073a7708b16a90\n-- \ngitgitgadget\n"}]}