Skip to content

Commit 01ec77c

Browse files
committed
t6020: use -C for worktree, --git-dir for bare repository
To prepare for `safe.bareRepository` defaulting to `explicit` (see 8d1a744), 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 <johannes.schindelin@gmx.de>
1 parent f09a96e commit 01ec77c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t6020-bundle-misc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,9 @@ do
594594
reflist=$(git for-each-ref --format="%(objectname)") &&
595595
git rev-list --objects --filter=$filter --missing=allow-any \
596596
$reflist >expect &&
597-
for repo in cloned unbundled
597+
for opt in "--git-dir cloned" "-C unbundled"
598598
do
599-
git -C $repo rev-list --objects --missing=allow-any \
599+
git $opt rev-list --objects --missing=allow-any \
600600
$reflist >actual &&
601601
test_cmp expect actual || return 1
602602
done

0 commit comments

Comments
 (0)