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:22 +0300
committerJunio C Hamano <gitster@pobox.com>2020-11-20 02:44:18 +0300
commit883b98efade212bf1496a93dd8a691355a31daf0 (patch)
tree5a9c67eb117e5840725328bbfae9714d3b8e5eb0 /t/t2011-checkout-invalid-head.sh
parent06d531486e9078c88c324ad6f87376cfa897f058 (diff)
t2*: adjust the references to the default branch name "main"
Carefully excluding t2106, which sees independent development elsewhere at the time of writing, we transition above-mentioned tests to the default branch name `main`. This trick was performed via $ (cd t && sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -- t2*.sh && git checkout HEAD -- t2106\*) This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for those tests. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2011-checkout-invalid-head.sh')
-rwxr-xr-xt/t2011-checkout-invalid-head.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/t/t2011-checkout-invalid-head.sh b/t/t2011-checkout-invalid-head.sh
index fede33ff1f..e52022e152 100755
--- a/t/t2011-checkout-invalid-head.sh
+++ b/t/t2011-checkout-invalid-head.sh
@@ -2,7 +2,7 @@
test_description='checkout switching away from an invalid branch'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -14,12 +14,12 @@ test_expect_success 'setup' '
'
test_expect_success 'checkout should not start branch from a tree' '
- test_must_fail git checkout -b newbranch master^{tree}
+ test_must_fail git checkout -b newbranch main^{tree}
'
-test_expect_success 'checkout master from invalid HEAD' '
+test_expect_success 'checkout main from invalid HEAD' '
echo $ZERO_OID >.git/HEAD &&
- git checkout master --
+ git checkout main --
'
test_expect_success 'checkout notices failure to lock HEAD' '
@@ -29,7 +29,7 @@ test_expect_success 'checkout notices failure to lock HEAD' '
'
test_expect_success 'create ref directory/file conflict scenario' '
- git update-ref refs/heads/outer/inner master &&
+ git update-ref refs/heads/outer/inner main &&
# do not rely on symbolic-ref to get a known state,
# as it may use the same code we are testing
@@ -40,12 +40,12 @@ test_expect_success 'create ref directory/file conflict scenario' '
test_expect_success 'checkout away from d/f HEAD (unpacked, to branch)' '
reset_to_df &&
- git checkout master
+ git checkout main
'
test_expect_success 'checkout away from d/f HEAD (unpacked, to detached)' '
reset_to_df &&
- git checkout --detach master
+ git checkout --detach main
'
test_expect_success 'pack refs' '
@@ -54,11 +54,11 @@ test_expect_success 'pack refs' '
test_expect_success 'checkout away from d/f HEAD (packed, to branch)' '
reset_to_df &&
- git checkout master
+ git checkout main
'
test_expect_success 'checkout away from d/f HEAD (packed, to detached)' '
reset_to_df &&
- git checkout --detach master
+ git checkout --detach main
'
test_done