Re: [PATCH v12 1/8] t/t5505-remote: set default branch to main
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 15, 2024, 04:52 UTC
- Message-ID
- <xmqqfrnt3xpd.fsf@gitster.g>
- In-Reply-To
- <20241023153736.257733-2-bence@ferdinandy.com>
Bence Ferdinandy <bence@ferdinandy.com> writes:
Show 7 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.Making sure that the hardcoded (in the Git binary) default branch name would not affect the outcome of the test is a good thing to do. I like the patch text, but ...
Show 6 quoted lines
> Since the CI globally exports GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main, > there's a drift between how the test repositories are set up in the CI > and during local testing. This issue does not manifest currently, as the > test does not do any remote HEAD manipulation where this would come up, > but should such things be added, a locally passing test would break the > CI vice-versa.
... this description may not quite be accurate. Don't some jobs of CI use 'main' while the rest use 'master'?