From 8f37854b187a4539dd37752b2631849c94bd627b Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 18 Nov 2020 23:44:27 +0000 Subject: 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 Signed-off-by: Junio C Hamano --- t/t4103-apply-binary.sh | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 't/t4103-apply-binary.sh') diff --git a/t/t4103-apply-binary.sh b/t/t4103-apply-binary.sh index ee4a74b132..fad6d3f542 100755 --- a/t/t4103-apply-binary.sh +++ b/t/t4103-apply-binary.sh @@ -6,7 +6,7 @@ test_description='git apply handling binary patches ' -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh @@ -34,64 +34,64 @@ test_expect_success 'setup' ' git update-index --add --remove file1 file2 file3 file4 && git commit -m "Second Version" && - git diff-tree -p master binary >B.diff && - git diff-tree -p -C master binary >C.diff && + git diff-tree -p main binary >B.diff && + git diff-tree -p -C main binary >C.diff && - git diff-tree -p --binary master binary >BF.diff && - git diff-tree -p --binary -C master binary >CF.diff && + git diff-tree -p --binary main binary >BF.diff && + git diff-tree -p --binary -C main binary >CF.diff && - git diff-tree -p --full-index master binary >B-index.diff && - git diff-tree -p -C --full-index master binary >C-index.diff && + git diff-tree -p --full-index main binary >B-index.diff && + git diff-tree -p -C --full-index main binary >C-index.diff && - git diff-tree -p --binary --no-prefix master binary -- file3 >B0.diff && + git diff-tree -p --binary --no-prefix main binary -- file3 >B0.diff && git init other-repo && ( cd other-repo && - git fetch .. master && + git fetch .. main && git reset --hard FETCH_HEAD ) ' test_expect_success 'stat binary diff -- should not fail.' \ - 'git checkout master && + 'git checkout main && git apply --stat --summary B.diff' test_expect_success 'stat binary -p0 diff -- should not fail.' ' - git checkout master && + git checkout main && git apply --stat -p0 B0.diff ' test_expect_success 'stat binary diff (copy) -- should not fail.' \ - 'git checkout master && + 'git checkout main && git apply --stat --summary C.diff' test_expect_success 'check binary diff -- should fail.' \ - 'git checkout master && + 'git checkout main && test_must_fail git apply --check B.diff' test_expect_success 'check binary diff (copy) -- should fail.' \ - 'git checkout master && + 'git checkout main && test_must_fail git apply --check C.diff' test_expect_success \ 'check incomplete binary diff with replacement -- should fail.' ' - git checkout master && + git checkout main && test_must_fail git apply --check --allow-binary-replacement B.diff ' test_expect_success \ 'check incomplete binary diff with replacement (copy) -- should fail.' ' - git checkout master && + git checkout main && test_must_fail git apply --check --allow-binary-replacement C.diff ' test_expect_success 'check binary diff with replacement.' \ - 'git checkout master && + 'git checkout main && git apply --check --allow-binary-replacement BF.diff' test_expect_success 'check binary diff with replacement (copy).' \ - 'git checkout master && + 'git checkout main && git apply --check --allow-binary-replacement CF.diff' # Now we start applying them. @@ -99,7 +99,7 @@ test_expect_success 'check binary diff with replacement (copy).' \ do_reset () { rm -f file? && git reset --hard && - git checkout -f master + git checkout -f main } test_expect_success 'apply binary diff -- should fail.' \ -- cgit v1.2.3