Re: [PATCH v13 1/9] t/t5505-remote: set default branch to main
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 20, 2024, 03:46 UTC
- Message-ID
- <xmqqr0767ej6.fsf@gitster.g>
- In-Reply-To
- <20241118151755.756265-2-bence@ferdinandy.com>
Bence Ferdinandy <bence@ferdinandy.com> writes:
Show 10 quoted lines
> 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".