@@ -83,19 +83,19 @@ test_config () {
8383 '
8484
8585 test_expect_success " fetch $desc (enabled)" '
86- git -C tmp.git -c protocol.$proto.allow=always fetch
86+ git --git-dir= tmp.git -c protocol.$proto.allow=always fetch
8787 '
8888
8989 test_expect_success " push $desc (enabled)" '
90- git -C tmp.git -c protocol.$proto.allow=always push origin HEAD:pushed
90+ git --git-dir= tmp.git -c protocol.$proto.allow=always push origin HEAD:pushed
9191 '
9292
9393 test_expect_success " push $desc (disabled)" '
94- test_must_fail git -C tmp.git -c protocol.$proto.allow=never push origin HEAD:pushed
94+ test_must_fail git --git-dir= tmp.git -c protocol.$proto.allow=never push origin HEAD:pushed
9595 '
9696
9797 test_expect_success " fetch $desc (disabled)" '
98- test_must_fail git -C tmp.git -c protocol.$proto.allow=never fetch
98+ test_must_fail git --git-dir= tmp.git -c protocol.$proto.allow=never fetch
9999 '
100100
101101 test_expect_success " clone $desc (disabled)" '
@@ -110,11 +110,11 @@ test_config () {
110110 '
111111
112112 test_expect_success " fetch $desc (enabled)" '
113- git -C tmp.git -c protocol.$proto.allow=user fetch
113+ git --git-dir= tmp.git -c protocol.$proto.allow=user fetch
114114 '
115115
116116 test_expect_success " push $desc (enabled)" '
117- git -C tmp.git -c protocol.$proto.allow=user push origin HEAD:pushed
117+ git --git-dir= tmp.git -c protocol.$proto.allow=user push origin HEAD:pushed
118118 '
119119
120120 test_expect_success " push $desc (disabled)" '
@@ -153,22 +153,22 @@ test_config () {
153153
154154 test_expect_success " fetch $desc (enabled)" '
155155 test_config_global protocol.allow always &&
156- git -C tmp.git fetch
156+ git --git-dir= tmp.git fetch
157157 '
158158
159159 test_expect_success " push $desc (enabled)" '
160160 test_config_global protocol.allow always &&
161- git -C tmp.git push origin HEAD:pushed
161+ git --git-dir= tmp.git push origin HEAD:pushed
162162 '
163163
164164 test_expect_success " push $desc (disabled)" '
165165 test_config_global protocol.allow never &&
166- test_must_fail git -C tmp.git push origin HEAD:pushed
166+ test_must_fail git --git-dir= tmp.git push origin HEAD:pushed
167167 '
168168
169169 test_expect_success " fetch $desc (disabled)" '
170170 test_config_global protocol.allow never &&
171- test_must_fail git -C tmp.git fetch
171+ test_must_fail git --git-dir= tmp.git fetch
172172 '
173173
174174 test_expect_success " clone $desc (disabled)" '
0 commit comments