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:27 +0300
committerJunio C Hamano <gitster@pobox.com>2020-11-20 02:44:18 +0300
commit8f37854b187a4539dd37752b2631849c94bd627b (patch)
treeb57147cbdc2774ace04b7ea1f648900a6d59b08f /t/t4108-apply-threeway.sh
parentcbc75a12f056c9e6eef30b92db2dc0ce99e97dbe (diff)
t4*: adjust the references to the default branch name "main"
Carefully excluding t4013 and t4015, which see independent development elsewhere at the time of writing, we use `main` as the default branch name in t4*. This trick was performed via $ (cd t && sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -- t4*.sh t4211/*.export && git checkout HEAD -- t4013\*) 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/t4108-apply-threeway.sh')
-rwxr-xr-xt/t4108-apply-threeway.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/t/t4108-apply-threeway.sh b/t/t4108-apply-threeway.sh
index 0a091dc5a0..d62db3fbe1 100755
--- a/t/t4108-apply-threeway.sh
+++ b/t/t4108-apply-threeway.sh
@@ -2,7 +2,7 @@
test_description='git apply --3way'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -27,14 +27,14 @@ test_expect_success setup '
test_tick &&
test_write_lines 1 two 3 4 5 six 7 >one &&
test_write_lines 1 two 3 4 5 6 7 >two &&
- git commit -a -m master &&
+ git commit -a -m main &&
git checkout side &&
test_write_lines 1 2 3 4 five 6 7 >one &&
test_write_lines 1 2 3 4 five 6 7 >two &&
git commit -a -m side &&
- git checkout master
+ git checkout main
'
test_expect_success 'apply without --3way' '
@@ -42,7 +42,7 @@ test_expect_success 'apply without --3way' '
# should fail to apply
git reset --hard &&
- git checkout master^0 &&
+ git checkout main^0 &&
test_must_fail git apply --index P.diff &&
# should leave things intact
git diff-files --exit-code &&
@@ -55,14 +55,14 @@ test_apply_with_3way () {
# The corresponding conflicted merge
git reset --hard &&
- git checkout master^0 &&
+ git checkout main^0 &&
test_must_fail git merge --no-commit side &&
git ls-files -s >expect.ls &&
print_sanitized_conflicted_diff >expect.diff &&
# should fail to apply
git reset --hard &&
- git checkout master^0 &&
+ git checkout main^0 &&
test_must_fail git apply --index --3way P.diff &&
git ls-files -s >actual.ls &&
print_sanitized_conflicted_diff >actual.diff &&
@@ -89,7 +89,7 @@ test_expect_success 'apply with --3way with rerere enabled' '
# The corresponding conflicted merge
git reset --hard &&
- git checkout master^0 &&
+ git checkout main^0 &&
test_must_fail git merge --no-commit side &&
# Manually resolve and record the resolution
@@ -99,7 +99,7 @@ test_expect_success 'apply with --3way with rerere enabled' '
# should fail to apply
git reset --hard &&
- git checkout master^0 &&
+ git checkout main^0 &&
test_must_fail git apply --index --3way P.diff &&
# but rerere should have replayed the recorded resolution