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>
This commit is contained in:

committed by
Junio C Hamano

parent
c2fdc8820c
commit
06d531486e
@ -5,7 +5,7 @@
|
||||
|
||||
test_description='Test shared repository initialization'
|
||||
|
||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
|
||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
. ./test-lib.sh
|
||||
@ -118,13 +118,13 @@ test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '
|
||||
umask 077 &&
|
||||
git config core.sharedRepository group &&
|
||||
git reflog expire --all &&
|
||||
actual="$(ls -l .git/logs/refs/heads/master)" &&
|
||||
actual="$(ls -l .git/logs/refs/heads/main)" &&
|
||||
case "$actual" in
|
||||
-rw-rw-*)
|
||||
: happy
|
||||
;;
|
||||
*)
|
||||
echo Ooops, .git/logs/refs/heads/master is not 0662 [$actual]
|
||||
echo Ooops, .git/logs/refs/heads/main is not 0662 [$actual]
|
||||
false
|
||||
;;
|
||||
esac
|
||||
|
Reference in New Issue
Block a user