mirror of
https://github.com/git/git.git
synced 2026-01-11 13:23:12 +09:00
Since 1296cbe4b46 (init: document `init.defaultBranch` better, 2020-12-11) "git-init.adoc" has advertised that the default name of the initial branch may change in the future. The name "main" is chosen to match the default used by the big Git forge web sites. The advice printed when init.defaultBranch is not set is updated to say that the default will change to "main" in Git 3.0. Building with WITH_BREAKING_CHANGES enabled removes the advice and changes the default branch name to "main". The code in guess_remote_head() that looks for "refs/heads/master" is left unchanged as that is only called when the remote server does not support the symref capability in the v0 protocol or the symref extension to the ls-refs list in the v2 protocol. Such an old server is more likely to be using "master" as the default branch name. With the exception of the "git-init.adoc" the documentation is left unchanged. I had hoped to parameterize the name of the default branch by using an asciidoc attribute. Unfortunately attribute expansion is inhibited by backticks and we use backticks to mark up ref names so that idea does not work. As the changes to git-init.adoc show inserting ifdef's around each instance of the branch name "master" is cumbersome and makes the documentation sources harder to read. Apart from "git-init.adoc" there are some other files where "master" is used as the name of the initial branch rather than as an example of a branch name such as "user-manual.adoc" and "gitcore-tutorial.adoc". The name appears a lot in those so updating it with ifdef's is not really practical. We can update that document in the 3.0 release cycle. The other documentation where master is used as an example branch name can be gradually converted over time. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
76 lines
1.7 KiB
Bash
Executable File
76 lines
1.7 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Build and test Git
|
|
#
|
|
|
|
. ${0%/*}/lib.sh
|
|
|
|
run_tests=t
|
|
|
|
case "$jobname" in
|
|
linux-breaking-changes)
|
|
export WITH_BREAKING_CHANGES=YesPlease
|
|
;;
|
|
linux-TEST-vars)
|
|
export OPENSSL_SHA1_UNSAFE=YesPlease
|
|
export GIT_TEST_SPLIT_INDEX=yes
|
|
export GIT_TEST_FULL_IN_PACK_ARRAY=true
|
|
export GIT_TEST_OE_SIZE=10
|
|
export GIT_TEST_OE_DELTA_SIZE=5
|
|
export GIT_TEST_COMMIT_GRAPH=1
|
|
export GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS=1
|
|
export GIT_TEST_MULTI_PACK_INDEX=1
|
|
export GIT_TEST_MULTI_PACK_INDEX_WRITE_INCREMENTAL=1
|
|
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
|
|
export GIT_TEST_NO_WRITE_REV_INDEX=1
|
|
export GIT_TEST_CHECKOUT_WORKERS=2
|
|
export GIT_TEST_PACK_USE_BITMAP_BOUNDARY_TRAVERSAL=1
|
|
;;
|
|
linux-clang)
|
|
export GIT_TEST_DEFAULT_HASH=sha1
|
|
;;
|
|
linux-sha256)
|
|
export GIT_TEST_DEFAULT_HASH=sha256
|
|
;;
|
|
linux-reftable|linux-reftable-leaks|osx-reftable)
|
|
export GIT_TEST_DEFAULT_REF_FORMAT=reftable
|
|
;;
|
|
pedantic)
|
|
# Don't run the tests; we only care about whether Git can be
|
|
# built.
|
|
export DEVOPTS=pedantic
|
|
run_tests=
|
|
;;
|
|
esac
|
|
|
|
case "$jobname" in
|
|
*-meson)
|
|
group "Configure" meson setup build . \
|
|
--fatal-meson-warnings \
|
|
--warnlevel 2 --werror \
|
|
--wrap-mode nofallback \
|
|
-Dfuzzers=true \
|
|
-Dtest_output_directory="${TEST_OUTPUT_DIRECTORY:-$(pwd)/t}" \
|
|
$MESONFLAGS
|
|
group "Build" meson compile -C build --
|
|
if test -n "$run_tests"
|
|
then
|
|
group "Run tests" meson test -C build --print-errorlogs --test-args="$GIT_TEST_OPTS" || (
|
|
./t/aggregate-results.sh "${TEST_OUTPUT_DIRECTORY:-t}/test-results"
|
|
handle_failed_tests
|
|
)
|
|
fi
|
|
;;
|
|
*)
|
|
group Build make
|
|
if test -n "$run_tests"
|
|
then
|
|
group "Run tests" make test ||
|
|
handle_failed_tests
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
check_unignored_build_artifacts
|
|
save_good_tree
|