Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-19 02:44:33 +0300
committerJunio C Hamano <gitster@pobox.com>2020-11-20 02:44:18 +0300
commit3ac8f6301ee9d4bf3f9e58b3ef12ba536005cb9d (patch)
treeb978c1141f981533cdcd92440738f99c9782d07e /t/t5520-pull.sh
parentbc925ce3f3c338b20b6e95b72bc40cbdc4cd3dbb (diff)
t55[23]*: adjust the references to the default branch name "main"
Carefully excluding t5526, which sees independent development elsewhere at the time of writing, we use `main` as the default branch name in t55[23]*. This trick was performed via $ (cd t && sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -e 's/naster/nain/g' -- \ t55[23]*.sh && git checkout HEAD -- t5526\*) Note that t5533 contains a variation of the name `master` (`naster`) that we rename here, too. This commit allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for that range of tests. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5520-pull.sh')
-rwxr-xr-xt/t5520-pull.sh32
1 files changed, 16 insertions, 16 deletions
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index b6b21c6cd1..a09411327f 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -2,7 +2,7 @@
test_description='pulling into void'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -51,11 +51,11 @@ test_expect_success 'pulling into void' '
test_cmp file cloned/file
'
-test_expect_success 'pulling into void using master:master' '
+test_expect_success 'pulling into void using main:main' '
git init cloned-uho &&
(
cd cloned-uho &&
- git pull .. master:master
+ git pull .. main:main
) &&
test_path_is_file file &&
test_path_is_file cloned-uho/file &&
@@ -67,7 +67,7 @@ test_expect_success 'pulling into void does not overwrite untracked files' '
(
cd cloned-untracked &&
echo untracked >file &&
- test_must_fail git pull .. master &&
+ test_must_fail git pull .. main &&
echo untracked >expect &&
test_cmp expect file
)
@@ -79,7 +79,7 @@ test_expect_success 'pulling into void does not overwrite staged files' '
cd cloned-staged-colliding &&
echo "alternate content" >file &&
git add file &&
- test_must_fail git pull .. master &&
+ test_must_fail git pull .. main &&
echo "alternate content" >expect &&
test_cmp expect file &&
git cat-file blob :file >file.index &&
@@ -93,7 +93,7 @@ test_expect_success 'pulling into void does not remove new staged files' '
cd cloned-staged-new &&
echo "new tracked file" >newfile &&
git add newfile &&
- git pull .. master &&
+ git pull .. main &&
echo "new tracked file" >expect &&
test_cmp expect newfile &&
git cat-file blob :newfile >newfile.index &&
@@ -105,15 +105,15 @@ test_expect_success 'pulling into void must not create an octopus' '
git init cloned-octopus &&
(
cd cloned-octopus &&
- test_must_fail git pull .. master master &&
+ test_must_fail git pull .. main main &&
test_path_is_missing file
)
'
test_expect_success 'test . as a remote' '
- git branch copy master &&
+ git branch copy main &&
git config branch.copy.remote . &&
- git config branch.copy.merge refs/heads/master &&
+ git config branch.copy.merge refs/heads/main &&
echo updated >file &&
git commit -a -m updated &&
git checkout copy &&
@@ -129,7 +129,7 @@ test_expect_success 'test . as a remote' '
'
test_expect_success 'the default remote . should not break explicit pull' '
- git checkout -b second master^ &&
+ git checkout -b second main^ &&
echo modified >file &&
git commit -a -m modified &&
git checkout copy &&
@@ -364,7 +364,7 @@ test_expect_success 'failed --rebase shows advice' '
test_expect_success '--rebase fails with multiple branches' '
git reset --hard before-rebase &&
- test_must_fail git pull --rebase . copy master 2>err &&
+ test_must_fail git pull --rebase . copy main 2>err &&
test_cmp_rev HEAD before-rebase &&
test_i18ngrep "Cannot rebase onto multiple branches" err &&
echo modified >expect &&
@@ -503,7 +503,7 @@ test_expect_success 'pull --rebase does not warn on --no-verify-signatures' '
test_i18ngrep ! "verify-signatures" err
'
-# add a feature branch, keep-merge, that is merged into master, so the
+# add a feature branch, keep-merge, that is merged into main, so the
# test can try preserving the merge commit (or not) with various
# --rebase flags/pull.rebase settings.
test_expect_success 'preserve merge setup' '
@@ -702,12 +702,12 @@ test_expect_success 'pull --rebase dies early with dirty working directory' '
'
test_expect_success 'pull --rebase works on branch yet to be born' '
- git rev-parse master >expect &&
+ git rev-parse main >expect &&
mkdir empty_repo &&
(
cd empty_repo &&
git init &&
- git pull --rebase .. master &&
+ git pull --rebase .. main &&
git rev-parse HEAD >../actual
) &&
test_cmp expect actual
@@ -723,7 +723,7 @@ test_expect_success 'pull --rebase fails on unborn branch with staged changes' '
echo staged-file >expect &&
git ls-files >actual &&
test_cmp expect actual &&
- test_must_fail git pull --rebase .. master 2>err &&
+ test_must_fail git pull --rebase .. main 2>err &&
git ls-files >actual &&
test_cmp expect actual &&
git show :staged-file >actual &&
@@ -782,7 +782,7 @@ test_expect_success 'setup for avoiding reapplying old patches' '
(
cd dst &&
test_might_fail git rebase --abort &&
- git reset --hard origin/master
+ git reset --hard origin/main
) &&
git clone --bare src src-replace.git &&
rm -rf src &&