mirror of
https://github.com/git/git.git
synced 2024-11-30 21:44:02 +08:00
028cb644ec
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>
30 lines
803 B
Bash
Executable File
30 lines
803 B
Bash
Executable File
#!/bin/sh
|
|
|
|
test_description='test GIT_CURL_VERBOSE'
|
|
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
|
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
|
|
|
. ./test-lib.sh
|
|
. "$TEST_DIRECTORY"/lib-httpd.sh
|
|
start_httpd
|
|
|
|
test_expect_success 'setup repository' '
|
|
mkdir "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
|
|
git -C "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" --bare init &&
|
|
git config push.default matching &&
|
|
echo content >file &&
|
|
git add file &&
|
|
git commit -m one &&
|
|
git remote add public "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
|
|
git push public main:main
|
|
'
|
|
|
|
test_expect_success 'failure in git-upload-pack is shown' '
|
|
test_might_fail env GIT_CURL_VERBOSE=1 \
|
|
git clone "$HTTPD_URL/error_git_upload_pack/smart/repo.git" \
|
|
2>curl_log &&
|
|
grep "<= Recv header: HTTP/1.1 500 Intentional Breakage" curl_log
|
|
'
|
|
|
|
test_done
|