diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2020-11-18 23:44:22 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-19 15:44:18 -0800 |
commit | 883b98efade212bf1496a93dd8a691355a31daf0 (patch) | |
tree | 5a9c67eb117e5840725328bbfae9714d3b8e5eb0 /t/t2010-checkout-ambiguous.sh | |
parent | 06d531486e9078c88c324ad6f87376cfa897f058 (diff) | |
download | git-883b98efade212bf1496a93dd8a691355a31daf0.tar.gz |
t2*: adjust the references to the default branch name "main"
Carefully excluding t2106, which sees independent development elsewhere
at the time of writing, we transition above-mentioned tests 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' -- t2*.sh &&
git checkout HEAD -- t2106\*)
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/t2010-checkout-ambiguous.sh')
-rwxr-xr-x | t/t2010-checkout-ambiguous.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t2010-checkout-ambiguous.sh b/t/t2010-checkout-ambiguous.sh index 3f5431e033..6e8757387d 100755 --- a/t/t2010-checkout-ambiguous.sh +++ b/t/t2010-checkout-ambiguous.sh @@ -2,7 +2,7 @@ test_description='checkout and pathspecs/refspecs ambiguities' -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh @@ -20,7 +20,7 @@ test_expect_success 'reference must be a tree' ' ' test_expect_success 'branch switching' ' - test "refs/heads/master" = "$(git symbolic-ref HEAD)" && + test "refs/heads/main" = "$(git symbolic-ref HEAD)" && git checkout world -- && test "refs/heads/world" = "$(git symbolic-ref HEAD)" ' @@ -60,7 +60,7 @@ test_expect_success 'disambiguate checking out from a tree-ish' ' ' test_expect_success 'accurate error message with more than one ref' ' - test_must_fail git checkout HEAD master -- 2>actual && + test_must_fail git checkout HEAD main -- 2>actual && test_i18ngrep 2 actual && test_i18ngrep "one reference expected, 2 given" actual ' |