Re: [PATCH v13 1/9] t/t5505-remote: set default branch to main
From: Junio C Hamano <hidden>
Date: 2024-11-20 03:46:57
From: Junio C Hamano <hidden>
Date: 2024-11-20 03:46:57
Bence Ferdinandy [off-list ref] writes:
Consider the bare repository called "mirror" in the test. Running `git
remote add --mirror -f origin ../one` will not change HEAD, consequently
if init.defaultBranch is not the same as what HEAD in the remote
("one"), HEAD in "mirror" will be pointing to a non-existent reference.
Hence if "mirror" is used as a remote by yet another repository,
ls-remote will not show HEAD. On the other hand, if init.defaultBranch
happens to match HEAD in "one", then ls-remote will show HEAD.
Since the "ci/run-build-and-tests.sh" script globally exports
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main, there may be a drift in some"main," -> "main for some (but not all) jobs," or something. IOW, the point of that forced export is to test both.
tests between how the test repositories are set up in the CI and during local testing, if the test itself uses "master" as default instead of "main".