t7[5-9]*: adjust the references to the default branch name "main"
Excluding t7817, which is added in an unrelated patch series at the time
of writing, this adjusts t7[5-9]*. This trick was performed via
$ (cd t &&
sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \
-e 's/Master/Main/g' -- t7[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>
maint
Johannes Schindelin4 years agocommitted byJunio C Hamano
@ -79,7 +79,7 @@ test_expect_success 'output summary format for merges' '
@@ -79,7 +79,7 @@ test_expect_success 'output summary format for merges' '
output_tests_cleanup() {
# this is needed for "do not fire editor in the presence of conflicts"
git checkout master &&
git checkout main &&
# this is needed for the "partial removal" test to pass
git rm file1 &&
@ -443,7 +443,7 @@ test_expect_success 'do not fire editor in the presence of conflicts' '
@@ -443,7 +443,7 @@ test_expect_success 'do not fire editor in the presence of conflicts' '
git add g &&
git commit -m "add g" &&
git branch second &&
echo master >g &&
echo main >g &&
echo g >h &&
git add g h &&
git commit -m "modify g and add h" &&
@ -452,7 +452,7 @@ test_expect_success 'do not fire editor in the presence of conflicts' '
@@ -452,7 +452,7 @@ test_expect_success 'do not fire editor in the presence of conflicts' '
; and have 2 and 2 different commits each, respectively.
; (use "git pull" to merge the remote branch into yours)
@ -1408,7 +1408,7 @@ test_expect_success "status (core.commentchar with two chars with submodule summ
@@ -1408,7 +1408,7 @@ test_expect_success "status (core.commentchar with two chars with submodule summ
and have 2 and 2 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
@ -1554,7 +1554,7 @@ test_expect_success 'git commit --dry-run will show a staged but ignored submodu
@@ -1554,7 +1554,7 @@ test_expect_success 'git commit --dry-run will show a staged but ignored submodu
git reset HEAD^ &&
git add sm &&
cat >expect << EOF &&
On branch master
On branch main
Your branch and '\''upstream'\'' have diverged,
and have 2 and 2 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
test_description='per-repo forced setting of email address'
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@ -50,24 +50,24 @@ test_expect_success 'set up rebase scenarios' '
@@ -50,24 +50,24 @@ test_expect_success 'set up rebase scenarios' '
test_expect_success 'fast-forward rebase does not care about ident' '
git checkout -B tmp side-without-commit &&
git rebase master
git rebase main
'
test_expect_success 'non-fast-forward rebase refuses to write commits' '
test_when_finished "git rebase --abort || true" &&
git checkout -B tmp side-with-commit &&
test_must_fail git rebase master
test_must_fail git rebase main
'
test_expect_success 'fast-forward rebase does not care about ident (interactive)' '
git checkout -B tmp side-without-commit &&
git rebase -i master
git rebase -i main
'
test_expect_success 'non-fast-forward rebase refuses to write commits (interactive)' '
test_when_finished "git rebase --abort || true" &&
git checkout -B tmp side-with-commit &&
test_must_fail git rebase -i master
test_must_fail git rebase -i main
'
test_expect_success 'noop interactive rebase does not care about ident' '
@ -78,14 +78,14 @@ test_expect_success 'noop interactive rebase does not care about ident' '
@@ -78,14 +78,14 @@ test_expect_success 'noop interactive rebase does not care about ident' '
test_expect_success REBASE_P \
'fast-forward rebase does not care about ident (preserve)' '
git checkout -B tmp side-without-commit &&
git rebase -p master
git rebase -p main
'
test_expect_success REBASE_P \
'non-fast-forward rebase refuses to write commits (preserve)' '
test_when_finished "git rebase --abort || true" &&
@ -182,7 +182,7 @@ test_expect_success 'gui mergetool without merge.guitool set falls back to merge
@@ -182,7 +182,7 @@ test_expect_success 'gui mergetool without merge.guitool set falls back to merge
@ -190,11 +190,11 @@ test_expect_success 'gui mergetool without merge.guitool set falls back to merge
@@ -190,11 +190,11 @@ test_expect_success 'gui mergetool without merge.guitool set falls back to merge
git mergetool --no-prompt --tool defaults -- both &&
echo master both added >expected &&
echo main both added >expected &&
test_cmp expected both
'
@ -754,7 +754,7 @@ test_expect_success 'filenames seen by tools start with ./' '
@@ -754,7 +754,7 @@ test_expect_success 'filenames seen by tools start with ./' '
git mergetool --no-prompt --tool myecho -- both >actual &&
grep ^\./both_LOCAL_ actual
'
@ -771,7 +771,7 @@ test_expect_success MKTEMP 'temporary filenames are used with mergetool.writeToT
@@ -771,7 +771,7 @@ test_expect_success MKTEMP 'temporary filenames are used with mergetool.writeToT
@ -7,7 +7,7 @@ Set up repo with conflicting and non-conflicting branches:
@@ -7,7 +7,7 @@ Set up repo with conflicting and non-conflicting branches:
There are three files foo/bar/baz, and the following graph illustrates the
content of these files in each commit:
# foo/bar/baz --- foo/bar/bazz <-- master
# foo/bar/baz --- foo/bar/bazz <-- main
# \
# --- foo/barf/bazf <-- conflict_branch
# \
@ -22,7 +22,7 @@ Next, test git merge --abort with the following variables:
@@ -22,7 +22,7 @@ Next, test git merge --abort with the following variables: