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:
authorJunio C Hamano <gitster@pobox.com>2021-01-26 01:19:18 +0300
committerJunio C Hamano <gitster@pobox.com>2021-01-26 01:19:18 +0300
commit27d7c8599b159862762e2bd121c22d516fb04e90 (patch)
tree91bed47151791fe2e18e8e9e07a5d58207413bda /t/t1508-at-combinations.sh
parent440acfbe0cec5c2316ef7a706c975143c4902b20 (diff)
parent8b70966aa90b52427e1a09329abde8d845f90398 (diff)
Merge branch 'js/default-branch-name-tests-final-stretch'
Prepare tests not to be affected by the name of the default branch "git init" creates. * js/default-branch-name-tests-final-stretch: (28 commits) tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed t99*: adjust the references to the default branch name "main" tests(git-p4): transition to the default branch name `main` t9[5-7]*: adjust the references to the default branch name "main" t9[0-4]*: adjust the references to the default branch name "main" t8*: adjust the references to the default branch name "main" t7[5-9]*: adjust the references to the default branch name "main" t7[0-4]*: adjust the references to the default branch name "main" t6[4-9]*: adjust the references to the default branch name "main" t64*: preemptively adjust alignment to prepare for `master` -> `main` t6[0-3]*: adjust the references to the default branch name "main" t5[6-9]*: adjust the references to the default branch name "main" t55[4-9]*: adjust the references to the default branch name "main" t55[23]*: adjust the references to the default branch name "main" t551*: adjust the references to the default branch name "main" t550*: adjust the references to the default branch name "main" t5503: prepare aligned comment for replacing `master` with `main` t5[0-4]*: adjust the references to the default branch name "main" t5323: prepare centered comment for `master` -> `main` t4*: adjust the references to the default branch name "main" ...
Diffstat (limited to 't/t1508-at-combinations.sh')
-rwxr-xr-xt/t1508-at-combinations.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh
index e4521b7b97..87a4286414 100755
--- a/t/t1508-at-combinations.sh
+++ b/t/t1508-at-combinations.sh
@@ -1,6 +1,9 @@
#!/bin/sh
test_description='test various @{X} syntax combinations together'
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
. ./test-lib.sh
check() {
@@ -30,8 +33,8 @@ fail() {
}
test_expect_success 'setup' '
- test_commit master-one &&
- test_commit master-two &&
+ test_commit main-one &&
+ test_commit main-two &&
git checkout -b upstream-branch &&
test_commit upstream-one &&
test_commit upstream-two &&
@@ -47,7 +50,7 @@ test_expect_success 'setup' '
git checkout -b new-branch &&
test_commit new-one &&
test_commit new-two &&
- git branch -u master old-branch &&
+ git branch -u main old-branch &&
git branch -u upstream-branch new-branch
'
@@ -62,8 +65,8 @@ check "@{-1}@{1}" commit old-one
check "@{u}" ref refs/heads/upstream-branch
check "HEAD@{u}" ref refs/heads/upstream-branch
check "@{u}@{1}" commit upstream-one
-check "@{-1}@{u}" ref refs/heads/master
-check "@{-1}@{u}@{1}" commit master-one
+check "@{-1}@{u}" ref refs/heads/main
+check "@{-1}@{u}@{1}" commit main-one
check "@" commit new-two
check "@@{u}" ref refs/heads/upstream-branch
check "@@/at-test" ref refs/heads/@@/at-test
@@ -100,14 +103,14 @@ check "@:normal" blob content
check "@:fun@ny" blob content
test_expect_success '@{1} works with only one reflog entry' '
- git checkout -B newbranch master &&
+ git checkout -B newbranch main &&
git reflog expire --expire=now refs/heads/newbranch &&
git commit --allow-empty -m "first after expiration" &&
test_cmp_rev newbranch~ newbranch@{1}
'
test_expect_success '@{0} works with empty reflog' '
- git checkout -B newbranch master &&
+ git checkout -B newbranch main &&
git reflog expire --expire=now refs/heads/newbranch &&
test_cmp_rev newbranch newbranch@{0}
'