From: Johannes Schindelin via GitGitGadget Date: Thu, 02 Apr 2026 14:33:20 GMT Subject: [PATCH 14/17] t6020: use `-C` for worktree, `--git-dir` for bare repository Message-ID: <1ae4caf1559d23d32c72fc1bf94c5c0025baf7c4.1775140403.git.gitgitgadget@gmail.com> In-Reply-To: From: Johannes Schindelin To prepare for `safe.bareRepository` defaulting to `explicit` (see 8d1a7448206e), adjust a loop that iterated over both a bare (`cloned`) and a non-bare (`unbundled`) repository using the same `-C` flag: the bare repo needs `--git-dir` to avoid implicit discovery, while the non-bare one keeps `-C`. Signed-off-by: Johannes Schindelin --- t/t6020-bundle-misc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t6020-bundle-misc.sh b/t/t6020-bundle-misc.sh index 500c81b8a1..82df105b47 100755 --- a/t/t6020-bundle-misc.sh +++ b/t/t6020-bundle-misc.sh @@ -594,9 +594,9 @@ do reflist=$(git for-each-ref --format="%(objectname)") && git rev-list --objects --filter=$filter --missing=allow-any \ $reflist >expect && - for repo in cloned unbundled + for opt in "--git-dir cloned" "-C unbundled" do - git -C $repo rev-list --objects --missing=allow-any \ + git $opt rev-list --objects --missing=allow-any \ $reflist >actual && test_cmp expect actual || return 1 done -- gitgitgadget