t0001: drop useless subshells

Many tests use subshells, but don't actually change the shell environment. They were probably cargo-culted from earlier tests which did need subshells. Drop the useless ones. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Mar 20, 2014 at 19:21 UTC 99e1c7367f34ecc69ce46263309610b66d027d88
1 file changed +22 -39
t/t0001-init.sh
+22 -39
@@ -106,11 +106,8 @@ test_expect_success 'plain bare with GIT_WORK_TREE' '
106 '
107
108 test_expect_success 'GIT_DIR bare' '
109 -
110 - (
111 - mkdir git-dir-bare.git &&
112 - GIT_DIR=git-dir-bare.git git init
113 - ) &&
109 + mkdir git-dir-bare.git &&
110 + GIT_DIR=git-dir-bare.git git init &&
111 check_config git-dir-bare.git true unset
112 '
113
@@ -242,36 +239,28 @@ test_expect_success 'init rejects insanely long --template' '
239
240 test_expect_success 'init creates a new directory' '
241 rm -fr newdir &&
245 - (
246 - git init newdir &&
247 - test_path_is_dir newdir/.git/refs
248 - )
242 + git init newdir &&
243 + test_path_is_dir newdir/.git/refs
244 '
245
246 test_expect_success 'init creates a new bare directory' '
247 rm -fr newdir &&
253 - (
254 - git init --bare newdir &&
255 - test_path_is_dir newdir/refs
256 - )
248 + git init --bare newdir &&
249 + test_path_is_dir newdir/refs
250 '
251
252 test_expect_success 'init recreates a directory' '
253 rm -fr newdir &&
261 - (
262 - mkdir newdir &&
263 - git init newdir &&
264 - test_path_is_dir newdir/.git/refs
265 - )
254 + mkdir newdir &&
255 + git init newdir &&
256 + test_path_is_dir newdir/.git/refs
257 '
258
259 test_expect_success 'init recreates a new bare directory' '
260 rm -fr newdir &&
270 - (
271 - mkdir newdir &&
272 - git init --bare newdir &&
273 - test_path_is_dir newdir/refs
274 - )
261 + mkdir newdir &&
262 + git init --bare newdir &&
263 + test_path_is_dir newdir/refs
264 '
265
266 test_expect_success 'init creates a new deep directory' '
@@ -297,30 +286,24 @@ test_expect_success POSIXPERM 'init creates a new deep directory (umask vs. shar
286
287 test_expect_success 'init notices EEXIST (1)' '
288 rm -fr newdir &&
300 - (
301 - >newdir &&
302 - test_must_fail git init newdir &&
303 - test_path_is_file newdir
304 - )
289 + >newdir &&
290 + test_must_fail git init newdir &&
291 + test_path_is_file newdir
292 '
293
294 test_expect_success 'init notices EEXIST (2)' '
295 rm -fr newdir &&
309 - (
310 - mkdir newdir &&
311 - >newdir/a
312 - test_must_fail git init newdir/a/b &&
313 - test_path_is_file newdir/a
314 - )
296 + mkdir newdir &&
297 + >newdir/a &&
298 + test_must_fail git init newdir/a/b &&
299 + test_path_is_file newdir/a
300 '
301
302 test_expect_success POSIXPERM,SANITY 'init notices EPERM' '
303 rm -fr newdir &&
319 - (
320 - mkdir newdir &&
321 - chmod -w newdir &&
322 - test_must_fail git init newdir/a/b
323 - )
304 + mkdir newdir &&
305 + chmod -w newdir &&
306 + test_must_fail git init newdir/a/b
307 '
308
309 test_expect_success 'init creates a new bare directory with global --bare' '