diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2020-11-18 23:44:29 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-19 23:44:18 (GMT) |
commit | 966b4be2765a9bd80febfd4660a1fa9e6408d143 (patch) | |
tree | 9fd8b1a1ddffac53a9e9f8209475f8f8f26b9554 /t/t5404-tracking-branches.sh | |
parent | 4b071211e6168ba16ea10bc1ad9e6bdfa26ad5b6 (diff) | |
download | git-966b4be2765a9bd80febfd4660a1fa9e6408d143.zip git-966b4be2765a9bd80febfd4660a1fa9e6408d143.tar.gz git-966b4be2765a9bd80febfd4660a1fa9e6408d143.tar.bz2 |
t5[0-4]*: adjust the references to the default branch name "main"
Carefully excluding t5310, which is developed independently of the
current patch series at the time of writing, we now use `main` as
default branch in t5[0-4]*. This trick was performed via
$ (cd t &&
sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \
-e 's/Master/Main/g' -- t5[0-4]*.sh &&
git checkout HEAD -- t5310\*)
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/t5404-tracking-branches.sh')
-rwxr-xr-x | t/t5404-tracking-branches.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/t/t5404-tracking-branches.sh b/t/t5404-tracking-branches.sh index da37b22..cc07889 100755 --- a/t/t5404-tracking-branches.sh +++ b/t/t5404-tracking-branches.sh @@ -2,7 +2,7 @@ test_description='tracking branch update checks for git push' -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh @@ -33,9 +33,9 @@ test_expect_success 'prepare pushable branches' ' git checkout -b b2 origin/b2 && echo aa-b2 >>file && git commit -a -m aa-b2 && - git checkout master && - echo aa-master >>file && - git commit -a -m aa-master + git checkout main && + echo aa-main >>file && + git commit -a -m aa-main ' test_expect_success 'mixed-success push returns error' ' @@ -43,7 +43,7 @@ test_expect_success 'mixed-success push returns error' ' ' test_expect_success 'check tracking branches updated correctly after push' ' - test "$(git rev-parse origin/master)" = "$(git rev-parse master)" + test "$(git rev-parse origin/main)" = "$(git rev-parse main)" ' test_expect_success 'check tracking branches not updated for failed refs' ' |