diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2020-11-19 00:44:21 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-20 00:44:18 +0100 |
commit | 06d531486e9078c88c324ad6f87376cfa897f058 (patch) | |
tree | c3ed8ffad4583e9bd1e717c782dc8b20784f2d91 /t/t1513-rev-parse-prefix.sh | |
parent | t0060: preemptively adjust alignment (diff) | |
download | git-06d531486e9078c88c324ad6f87376cfa897f058.tar.xz git-06d531486e9078c88c324ad6f87376cfa897f058.zip |
t[01]*: adjust the references to the default branch name "main"
Carefully excluding t1309, 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' -e 's/naster/nain/g' -- t[01]*.sh &&
git checkout HEAD -- t1309\*)
Note that t5533 contains a variation of the name `master` (`naster`)
that we rename here, too.
This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`
for those tests.
Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1513-rev-parse-prefix.sh')
-rwxr-xr-x | t/t1513-rev-parse-prefix.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t1513-rev-parse-prefix.sh b/t/t1513-rev-parse-prefix.sh index d151ef9218..5f437be8c9 100755 --- a/t/t1513-rev-parse-prefix.sh +++ b/t/t1513-rev-parse-prefix.sh @@ -2,7 +2,7 @@ test_description='Tests for rev-parse --prefix' -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh @@ -79,9 +79,9 @@ test_expect_success 'disambiguate path with valid prefix' ' ' test_expect_success 'file and refs with prefix' ' - git rev-parse --prefix sub1/ master file1 >actual && + git rev-parse --prefix sub1/ main file1 >actual && cat <<-EOF >expected && - $(git rev-parse master) + $(git rev-parse main) sub1/file1 EOF test_cmp expected actual |