Bence Ferdinandy <bence@xxxxxxxxxxxxxx> 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. 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 ... > 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'?