diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2020-11-18 23:44:35 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-19 23:44:18 (GMT) |
commit | 95cf2c01875fd66421d3551e9e86db435523575d (patch) | |
tree | 93b27344f9fac7d11a5bd27b849a13cde5b246d9 /t/t5611-clone-config.sh | |
parent | 028cb644ec6450fa9438ba6b6d100c0f34e029a5 (diff) | |
download | git-95cf2c01875fd66421d3551e9e86db435523575d.zip git-95cf2c01875fd66421d3551e9e86db435523575d.tar.gz git-95cf2c01875fd66421d3551e9e86db435523575d.tar.bz2 |
t5[6-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' -- t5[6-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/t5611-clone-config.sh')
-rwxr-xr-x | t/t5611-clone-config.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/t/t5611-clone-config.sh b/t/t5611-clone-config.sh index be4ae10..9f555b8 100755 --- a/t/t5611-clone-config.sh +++ b/t/t5611-clone-config.sh @@ -1,7 +1,7 @@ #!/bin/sh test_description='tests for git clone -c key=value' -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,16 +50,16 @@ test_expect_success 'clone -c config is available during clone' ' test_expect_success 'clone -c remote.origin.fetch=<refspec> works' ' rm -rf child && - git update-ref refs/grab/it refs/heads/master && - git update-ref refs/leave/out refs/heads/master && + git update-ref refs/grab/it refs/heads/main && + git update-ref refs/leave/out refs/heads/main && git clone -c "remote.origin.fetch=+refs/grab/*:refs/grab/*" . child && git -C child for-each-ref --format="%(refname)" >actual && cat >expect <<-\EOF && refs/grab/it - refs/heads/master + refs/heads/main refs/remotes/origin/HEAD - refs/remotes/origin/master + refs/remotes/origin/main EOF test_cmp expect actual ' @@ -71,9 +71,9 @@ test_expect_success 'git -c remote.origin.fetch=<refspec> clone works' ' cat >expect <<-\EOF && refs/grab/it - refs/heads/master + refs/heads/main refs/remotes/origin/HEAD - refs/remotes/origin/master + refs/remotes/origin/main EOF test_cmp expect actual ' @@ -88,9 +88,9 @@ test_expect_success 'clone -c remote.<remote>.fetch=<refspec> --origin=<name>' ' cat >expect <<-\EOF && refs/grab/it - refs/heads/master + refs/heads/main refs/remotes/upstream/HEAD - refs/remotes/upstream/master + refs/remotes/upstream/main EOF test_cmp expect actual ' |