Skip to content

Commit 2f1e745

Browse files
committed
t5509: specify bare repository path explicitly
When `ls-remote` is told to switch the current working directory to the bare repository `pushee` via `-C pushee`, as part of the `safe.bareRepository` preparation let's append `--git-dir=.` to spell out that this is a bare repository that does not need to be discovered implictly. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 6932658 commit 2f1e745

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

t/t5509-fetch-push-namespaces.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ test_expect_success 'mirroring a repository using a ref namespace' '
8888

8989
test_expect_success 'hide namespaced refs with transfer.hideRefs' '
9090
GIT_NAMESPACE=namespace \
91-
git -C pushee -c transfer.hideRefs=refs/tags \
91+
git -C pushee --git-dir=. -c transfer.hideRefs=refs/tags \
9292
ls-remote "ext::git %s ." >actual &&
9393
printf "$commit1\trefs/heads/main\n" >expected &&
9494
test_cmp expected actual
@@ -97,7 +97,7 @@ test_expect_success 'hide namespaced refs with transfer.hideRefs' '
9797
test_expect_success 'check that transfer.hideRefs does not match unstripped refs' '
9898
git -C pushee pack-refs --all &&
9999
GIT_NAMESPACE=namespace \
100-
git -C pushee -c transfer.hideRefs=refs/namespaces/namespace/refs/tags \
100+
git -C pushee --git-dir=. -c transfer.hideRefs=refs/namespaces/namespace/refs/tags \
101101
ls-remote "ext::git %s ." >actual &&
102102
printf "$commit1\trefs/heads/main\n" >expected &&
103103
printf "$commit0\trefs/tags/0\n" >>expected &&
@@ -107,7 +107,7 @@ test_expect_success 'check that transfer.hideRefs does not match unstripped refs
107107

108108
test_expect_success 'hide full refs with transfer.hideRefs' '
109109
GIT_NAMESPACE=namespace \
110-
git -C pushee -c transfer.hideRefs="^refs/namespaces/namespace/refs/tags" \
110+
git -C pushee --git-dir=. -c transfer.hideRefs="^refs/namespaces/namespace/refs/tags" \
111111
ls-remote "ext::git %s ." >actual &&
112112
printf "$commit1\trefs/heads/main\n" >expected &&
113113
test_cmp expected actual

0 commit comments

Comments
 (0)