summaryrefslogtreecommitdiff
path: root/t/t3504-cherry-pick-rerere.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-18 23:44:26 +0000
committerJunio C Hamano <gitster@pobox.com>2020-11-19 15:44:18 -0800
commitcbc75a12f056c9e6eef30b92db2dc0ce99e97dbe (patch)
tree71ea1a1a5a1999a8e9c80b9e65a8d3f2c0cfbce1 /t/t3504-cherry-pick-rerere.sh
parentd1c02d93b3374e031f87f9032c5dc6ef9bfbe0af (diff)
downloadgit-cbc75a12f056c9e6eef30b92db2dc0ce99e97dbe.tar.gz
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/t3504-cherry-pick-rerere.sh')
-rwxr-xr-xt/t3504-cherry-pick-rerere.sh26
1 files changed, 13 insertions, 13 deletions
diff --git a/t/t3504-cherry-pick-rerere.sh b/t/t3504-cherry-pick-rerere.sh
index 860ba0b496..9198535874 100755
--- a/t/t3504-cherry-pick-rerere.sh
+++ b/t/t3504-cherry-pick-rerere.sh
@@ -2,15 +2,15 @@
test_description='cherry-pick should rerere for conflicts'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
test_expect_success setup '
test_commit foo &&
- test_commit foo-master foo &&
- test_commit bar-master bar &&
+ test_commit foo-main foo &&
+ test_commit bar-main bar &&
git checkout -b dev foo &&
test_commit foo-dev foo &&
@@ -19,7 +19,7 @@ test_expect_success setup '
'
test_expect_success 'conflicting merge' '
- test_must_fail git merge master
+ test_must_fail git merge main
'
test_expect_success 'fixup' '
@@ -32,7 +32,7 @@ test_expect_success 'fixup' '
'
test_expect_success 'cherry-pick conflict with --rerere-autoupdate' '
- test_must_fail git cherry-pick --rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --rerere-autoupdate foo..bar-main &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
test_must_fail git cherry-pick --continue &&
@@ -44,7 +44,7 @@ test_expect_success 'cherry-pick conflict with --rerere-autoupdate' '
test_expect_success 'cherry-pick conflict repsects rerere.autoUpdate' '
test_config rerere.autoUpdate true &&
- test_must_fail git cherry-pick foo..bar-master &&
+ test_must_fail git cherry-pick foo..bar-main &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
test_must_fail git cherry-pick --continue &&
@@ -56,7 +56,7 @@ test_expect_success 'cherry-pick conflict repsects rerere.autoUpdate' '
test_expect_success 'cherry-pick conflict with --no-rerere-autoupdate' '
test_config rerere.autoUpdate true &&
- test_must_fail git cherry-pick --no-rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --no-rerere-autoupdate foo..bar-main &&
test_cmp foo-expect foo &&
test_must_fail git diff-files --quiet &&
git add foo &&
@@ -69,7 +69,7 @@ test_expect_success 'cherry-pick conflict with --no-rerere-autoupdate' '
'
test_expect_success 'cherry-pick --continue rejects --rerere-autoupdate' '
- test_must_fail git cherry-pick --rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --rerere-autoupdate foo..bar-main &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
test_must_fail git cherry-pick --continue --rerere-autoupdate >actual 2>&1 &&
@@ -82,25 +82,25 @@ test_expect_success 'cherry-pick --continue rejects --rerere-autoupdate' '
'
test_expect_success 'cherry-pick --rerere-autoupdate more than once' '
- test_must_fail git cherry-pick --rerere-autoupdate --rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --rerere-autoupdate --rerere-autoupdate foo..bar-main &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
git cherry-pick --abort &&
- test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate --rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate --rerere-autoupdate foo..bar-main &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
git cherry-pick --abort &&
- test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate foo..bar-master &&
+ test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate foo..bar-main &&
test_must_fail git diff-files --quiet &&
git cherry-pick --abort
'
test_expect_success 'cherry-pick conflict without rerere' '
test_config rerere.enabled false &&
- test_must_fail git cherry-pick foo-master &&
+ test_must_fail git cherry-pick foo-main &&
grep ===== foo &&
grep foo-dev foo &&
- grep foo-master foo
+ grep foo-main foo
'
test_done