From 018309581d4181ba3b36b2e736255f737a5e5ba5 Mon Sep 17 00:00:00 2001 From: Rootiest Date: Tue, 22 Sep 2026 00:04:36 -0400 Subject: [PATCH] fix(tests): pin init.defaultBranch in test-mkrep to silence git's hint Every mkrep call in this suite runs a bare `git init`. On a runner with no init.defaultBranch configured, git prints its "Using 'master' as the name for the initial branch" advice block on each one (20 occurrences in CI's test-job log, all from this file). test-agents-vault.fish already pins the same setting via GIT_CONFIG_COUNT/KEY/VALUE for the identical reason; apply the same fix here rather than in mkrep.fish itself, so a real user's own git config still wins in normal use. --- tests/test-mkrep.fish | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test-mkrep.fish b/tests/test-mkrep.fish index ae6e401..8018c69 100644 --- a/tests/test-mkrep.fish +++ b/tests/test-mkrep.fish @@ -35,6 +35,15 @@ set -gx GITEA_HOST '' set -gx GITLAB_URL '' set -gx GITLAB_HOST '' +# init.defaultBranch is pinned for the same reason test-agents-vault.fish +# pins it: a developer's global config says "main", a runner with no config +# falls back to "master" and prints git's advice hint on every `git init` +# this file makes. Pinning it here (not in mkrep.fish itself) keeps a real +# user's own global git config the one that wins in normal use. +set -gx GIT_CONFIG_COUNT 1 +set -gx GIT_CONFIG_KEY_0 init.defaultBranch +set -gx GIT_CONFIG_VALUE_0 main + function _mkrep_sandbox set -l tmp (mktemp -d) # Resolve symlinks (e.g. macOS/NixOS /tmp) so path comparisons against