t55[4-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' -e 's/retsam/niam/g' \ -- t55[4-9]*.sh t556x*) This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for those tests. Note that t5541 uses the reversed `master` name: `retsam`. We replace it by the equivalent for `main`: `niam`. 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
3ac8f6301e
commit
028cb644ec
@ -2,7 +2,7 @@
|
||||
|
||||
test_description='push from/to a shallow clone over http'
|
||||
|
||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
|
||||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
. ./test-lib.sh
|
||||
@ -54,12 +54,12 @@ test_expect_success 'push to shallow repo via http' '
|
||||
(
|
||||
cd full &&
|
||||
commit 9 &&
|
||||
git push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master
|
||||
git push $HTTPD_URL/smart/repo.git +main:refs/remotes/top/main
|
||||
) &&
|
||||
(
|
||||
cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
|
||||
git fsck &&
|
||||
git log --format=%s top/master >actual &&
|
||||
git log --format=%s top/main >actual &&
|
||||
cat <<EOF >expect &&
|
||||
9
|
||||
4
|
||||
@ -77,11 +77,11 @@ test_expect_success 'push from shallow repo via http' '
|
||||
git config http.receivepack true
|
||||
) &&
|
||||
commit 10 &&
|
||||
git push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master &&
|
||||
git push $HTTPD_URL/smart/repo.git +main:refs/remotes/top/main &&
|
||||
(
|
||||
cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
|
||||
git fsck &&
|
||||
git log --format=%s top/master >actual &&
|
||||
git log --format=%s top/main >actual &&
|
||||
cat <<EOF >expect &&
|
||||
10
|
||||
4
|
||||
|
Reference in New Issue
Block a user