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/t5604-clone-reference.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/t5604-clone-reference.sh')
-rwxr-xr-x | t/t5604-clone-reference.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/t/t5604-clone-reference.sh b/t/t5604-clone-reference.sh index 20fbb1e..5d68270 100755 --- a/t/t5604-clone-reference.sh +++ b/t/t5604-clone-reference.sh @@ -4,7 +4,7 @@ # test_description='test clone --reference' -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh @@ -52,7 +52,7 @@ test_expect_success 'existence of info/alternates' ' ' test_expect_success 'pulling from reference' ' - git -C C pull ../B master + git -C C pull ../B main ' test_expect_success 'that reference gets used' ' @@ -73,7 +73,7 @@ test_expect_success 'existence of info/alternates' ' ' test_expect_success 'pulling from reference' ' - git -C D pull ../B master + git -C D pull ../B main ' test_expect_success 'that reference gets used' ' @@ -139,11 +139,11 @@ test_expect_success 'prepare branched repository' ' git clone A J && ( cd J && - git checkout -b other master^ && + git checkout -b other main^ && echo other >otherfile && git add otherfile && git commit -m other && - git checkout master + git checkout main ) ' @@ -155,9 +155,9 @@ test_expect_success 'fetch with incomplete alternates' ' git remote add J "file://$base_dir/J" && GIT_TRACE_PACKET=$U.K git fetch J ) && - master_object=$(cd A && git for-each-ref --format="%(objectname)" refs/heads/master) && + main_object=$(cd A && git for-each-ref --format="%(objectname)" refs/heads/main) && test -s "$U.K" && - ! grep " want $master_object" "$U.K" && + ! grep " want $main_object" "$U.K" && tag_object=$(cd A && git for-each-ref --format="%(objectname)" refs/tags/HEAD) && ! grep " want $tag_object" "$U.K" ' |