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:26 +0300
committerJunio C Hamano <gitster@pobox.com>2020-11-20 02:44:18 +0300
commitcbc75a12f056c9e6eef30b92db2dc0ce99e97dbe (patch)
tree71ea1a1a5a1999a8e9c80b9e65a8d3f2c0cfbce1 /t/t3505-cherry-pick-empty.sh
parentd1c02d93b3374e031f87f9032c5dc6ef9bfbe0af (diff)
t3[5-9]*: adjust the references 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' -- t3[5-9]*.sh) 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/t3505-cherry-pick-empty.sh')
-rwxr-xr-xt/t3505-cherry-pick-empty.sh26
1 files changed, 13 insertions, 13 deletions
diff --git a/t/t3505-cherry-pick-empty.sh b/t/t3505-cherry-pick-empty.sh
index 20cd4052d4..eba3c38d5a 100755
--- a/t/t3505-cherry-pick-empty.sh
+++ b/t/t3505-cherry-pick-empty.sh
@@ -2,7 +2,7 @@
test_description='test cherry-picking an empty commit'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -20,7 +20,7 @@ test_expect_success setup '
test_tick &&
git commit --allow-empty-message -m "" &&
- git checkout master &&
+ git checkout main &&
git checkout -b empty-change-branch &&
test_tick &&
git commit --allow-empty -m "empty"
@@ -28,7 +28,7 @@ test_expect_success setup '
'
test_expect_success 'cherry-pick an empty commit' '
- git checkout master &&
+ git checkout main &&
test_expect_code 1 git cherry-pick empty-change-branch
'
@@ -38,7 +38,7 @@ test_expect_success 'index lockfile was removed' '
test_expect_success 'cherry-pick a commit with an empty message' '
test_when_finished "git reset --hard empty-message-branch~1" &&
- git checkout master &&
+ git checkout main &&
git cherry-pick empty-message-branch
'
@@ -47,12 +47,12 @@ test_expect_success 'index lockfile was removed' '
'
test_expect_success 'cherry-pick a commit with an empty message with --allow-empty-message' '
- git checkout -f master &&
+ git checkout -f main &&
git cherry-pick --allow-empty-message empty-message-branch
'
test_expect_success 'cherry pick an empty non-ff commit without --allow-empty' '
- git checkout master &&
+ git checkout main &&
echo fourth >>file2 &&
git add file2 &&
git commit -m "fourth" &&
@@ -60,22 +60,22 @@ test_expect_success 'cherry pick an empty non-ff commit without --allow-empty' '
'
test_expect_success 'cherry pick an empty non-ff commit with --allow-empty' '
- git checkout master &&
+ git checkout main &&
git cherry-pick --allow-empty empty-change-branch
'
test_expect_success 'cherry pick with --keep-redundant-commits' '
- git checkout master &&
+ git checkout main &&
git cherry-pick --keep-redundant-commits HEAD^
'
test_expect_success 'cherry-pick a commit that becomes no-op (prep)' '
- git checkout master &&
+ git checkout main &&
git branch fork &&
echo foo >file2 &&
git add file2 &&
test_tick &&
- git commit -m "add file2 on master" &&
+ git commit -m "add file2 on main" &&
git checkout fork &&
echo foo >file2 &&
@@ -87,15 +87,15 @@ test_expect_success 'cherry-pick a commit that becomes no-op (prep)' '
test_expect_success 'cherry-pick a no-op without --keep-redundant' '
git reset --hard &&
git checkout fork^0 &&
- test_must_fail git cherry-pick master
+ test_must_fail git cherry-pick main
'
test_expect_success 'cherry-pick a no-op with --keep-redundant' '
git reset --hard &&
git checkout fork^0 &&
- git cherry-pick --keep-redundant-commits master &&
+ git cherry-pick --keep-redundant-commits main &&
git show -s --format=%s >actual &&
- echo "add file2 on master" >expect &&
+ echo "add file2 on main" >expect &&
test_cmp expect actual
'